We have a lot of objects in our domain model which share their names with database keywords or system tables. One of the simplest examples is the object called USER. We also have a restriction that we cannot change their names to make them plural, etc.
In a default AndroMDA set up, the database creation scripts fail to create these tables in the database as the relevant statements fail with a syntax error. When we were not using AndroMDA to generate the HIBERNATE code, we had all names specified in .hbm.xml classes with backticks. This syntax is supported by HIBERNATE which then makes sure that the database creation scripts use the correct SQL syntax, based on the database dialect selected.
Right now we are forced to go into the tagged values for the offending objects and manually specify their table names with backticks. Therefore, the table name for USER has been manually specified as `USER`.
My suggestion is that a property called 'enableQuotedIdentifiers' be added to both the Profile and the Namespace which should be checked at the time of generating .hbm.xml files and if its value is found to be true, the table names be enclosed in backticks.
I have tested these changes locally on my machine by modifying the HIBERNATE cartridge and they work fine.