The attribute column name (EXCEPTION) is a reserved SQL-99 keyword.

#1

How do I fix this error/warning that Netbeans gives me?

"The attribute column name (EXCEPTION) is a reserved SQL-99 keyword."

#2

This warning indicates mapping to a field in the database that its name conflicts with SQL. This is not an issue with ObjectDB but could be with other DBMS.

To remove the warning, either rename your field (e.g. to exceptionText), or add a Column annotation that will map the name of the Java field to another name in the database:

@Column(name="exceptionText")
private String exception;

This annotation has no effect when using ObjectDB.

 

ObjectDB Support
#3

In Hibernate you can set the engine type and escape all columns in the hibernate.cfg.xml. Is there a way to escape all columns in ObjectDB and therefore implicitly suppress all respective warnings?

#4

I am not sure you can escape the NetBeans warning with the hibernate.cfg.xml file, which is not part of JPA. Anyway, you only need that annotation for some exceptional field names (such as exception). You can either use the @Column annotation or define the mapping in an orm xml mapping file (not documented on ObjectDB website).

ObjectDB Support

Reply