Hi,
After enabling the Hibernate Capabilites for my web project and creating Hibernate mappings into the project by using the MyEclipse Database Explorer, I wanted to change the datatypes of some columns in my database tables. So I properly made changes for them in Oracle SQL*PLUS. After that, I realized I also had to change the Hibernate mappings/settings/codes as well. So I took actions listed below:
1. Deleted the related Hibernate Java and hbm.xml files generated by MyEclipse
2. Remove all the respective <mapping> Elements from hibernate.cfg.xml
3. Opened the MyEclipse Database Explorer, displayed the target tables whose (column) datatypes were modified, and created Hibernate mappings again for the targets (BUT in a different package name from before)
The unexpected thing happened was that in hibernate.cfg.xml, all the removed <mapping> elements in step 2 were resurrected along with the new <mapping> elements. So I removed the resurrected ones.
Should I remove some lines in the “.myhibernatedata” file to prevent the problem? The file has contents like following. Is MyEclipse storing such mapping information in other places (or files), too?
config.mappings[1]=my/package/name/OldTablename1.hbm.xml
config.mappings[2]=my/package/name/OldTablename2.hbm.xml
config.mappings[3]=my/package/name/NewTablename1.hbm.xml
config.mappings[4]=my/package/name/NewTablename2.hbm.xml
…
Thank you for your time.