0

I have a project using Hibernate and external XML mapping files. I switched from MySQL to Oracle. Some of my fields have the name 'date', which is okay in MySQL but not in Oracle. It does not like <property name="date" column="date" type="string" /> so I changed it to <property name="sdate" column="sdate" type="string" /> When I re-rerun the code to generate the schema, it is still following the old version of the mapping file and not taking into account the new changes. I have even created a similar but different xml file and pointed my Hibernate config to this new file and it has the same problem.

Does anyone know why it could be following the old version of my mapping file and refusing to follow my updates?

Steve M.
  • 11
  • 2
  • date is a reserved word in oracle. check this link in stackoverflow - it should help escaping the reserved words. http://stackoverflow.com/questions/2224503/creating-field-with-reserved-word-name-with-jpa – maggu Apr 21 '13 at 22:05
  • I realize date is a reserved word in Oracle but my problem is that when I try to change it to a non-reserved word, the change doesn't take effect. Hibernate still tries to create a table with a field named 'date' even though I changed it to something else in the mapping file. – Steve M. Apr 21 '13 at 22:29
  • could be that your class path has a hibernate configuration xml (the old copy) - loaded from a packaged jar, referred from wild card reference in a directory etc. You could check that. – maggu Apr 22 '13 at 03:19
  • Thanks maggu, that was the problem – Steve M. Apr 22 '13 at 23:06

0 Answers0