Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
hibernate hbm.xml mapping or annotations?
System
LiveSite 7.1
Time to go after some data, we have extensive set of classes that use annotations for their mapping. Do we have to change over to use hbm.xml files or can can I use my annotated classes. Where would my persistence.xml file reside to set up the persistence-units? If it is in a manual please tell me which one.
Thanks again for all the help
Find more posts tagged with
Comments
Migrateduser
Did you ever get an answer on this question?
Migrateduser
Nope, thanks for asking.
Migrateduser
I am back to this again and hoping for some pointers. Previously, in a servlet app we stuck with the Java Persistence and annotations when using hibernate. I want the path of least resistance while using LiveSite 7.1.
Assuming, it is to go with the hbm.xml stuff then fine. I put the hbm files in /etc/conf/livesite_customer/orm. Where would my hibernate.cfg.xml go or what file should I be putting this info into. I would put it in the root of my src file but I dont get a good vibe about that when it comes to LiveSite. Also if it is not in the root of the source then what does the following need to look like?
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory()
If this is spelled out in one of the manuals which one and under what.
Thanks again.
Crsb
you can put the .cfg.xml anywhere you want and reference it in " new Configuration().configure("path to .cfg.xml").buildSessionFactory();"