Support for quoted identifiers is required
------------------------------------------
Key: HIB-198
URL: http://jira.andromda.org/browse/HIB-198
Project: Hibernate Cartridge
Type: New Feature
Versions: 3.2-RC1
Reporter: Manish Baxi
Assigned to: Carlos Cuenca
Priority: Critical
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.andromda.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV