- This topic has 1 reply, 2 voices, and was last updated 14 years, 2 months ago by support-shalini.
-
AuthorPosts
-
Srinivasa RagavanParticipantMyEclipse version 8.0
Build id: 8.0-20091120
Hibernate 3.2I have created reverse engineering POJOs including DAOs for MySQL Database tables.
When I have my custom code with HQL select refering generated POJOs, it works fine for MySQL database in which rev.engg done.
( I cannot use default findbyproperty method which comes with rev.engg due to multiple where condition columns).I am trying to execute same application connecting to Oracle 10g database, the same HQL statements are not working because Hibernate is throwing SQLGrammerException due to case sensitivity of column names generated in MySQL not compatible with Oracle.
On observation, column name for example CUSTOMERNAME (uppercase in both oracle and mysql), has been generated as ‘CustomerName’ in mapping file when generated with MySQL. But same column has been generated as ‘customername’ when connected and generated with Oracle.
Due to this, my custom HQL is not working during runtime.
Is there any method to specifiy in reverse engineering process, to make the generation of column names compatible with all databases, atleast with mysql and oracle database.
Or is it a limitation of hibernate.
Please suggest
-Rags
support-shaliniMemberRags,
On observation, column name for example CUSTOMERNAME (uppercase in both oracle and mysql), has been generated as ‘CustomerName’ in mapping file when generated with MySQL. But same column has been generated as ‘customername’ when connected and generated with Oracle.
I could not replicate this at my end using ME8.6. The column names generated in both the cases are in lowercase.
Can you upgrade to 8.6 and check if the issue persists?Is there any method to specifiy in reverse engineering process, to make the generation of column names compatible with all databases, atleast with mysql and oracle database.
You can try using the custom reverse engineering strategy as given in the link below –
http://www.myeclipseide.com/documentation/quickstarts/hibernate/#5-6
Let me know if that helps -
AuthorPosts