We came across the following situation.
Please note that I know reserved words should not be used for table names, but I'm asking the question anyway out of curiosity more than anything.
We are using Spring + Hibernate to manage our database. I am adding a new model to the database called Group. So, I define my model as:
@Entity
@Table(name = "group")
public class Group {
...
}
Now, the problem is, when recreating the tables, the SQL that gets generated looks as follows:
create table group (...)
This unfortunately is not allowed in MySQL since group
is a reserved word. The correct SQL should be:
create table `group`(...)
Is there any way for me to do this?