Using Hibernate and MySQL, I have this table
named Order
and a respective Order
bean.
@Entity
@org.hibernate.annotations.SelectBeforeUpdate(true)
@org.hibernate.annotations.DynamicUpdate(true)
@Table(name = "order")
public class Order {
...
}
I get this error. I believe the reason is that order
is
a reserved word in SQL, so the table name has to be qualified.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order order4...
What is the way to solve this in a RDBMS-independent way?
I mean I don't want to simply qualify my table name with
@Table(name = "`order`")
if possible (because the backtick symbol is a MySQL-dependent qualifier).
What is the best way to solve this issue?