Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where to put *.hbm.xml file

 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am new to Hibernate , and i want to ask that where to put *.hbm.xml file.

Please tell the necessary work for that.

Thanks
Regards
Gaurav
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put in the classpath in the same place as your pojo class.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually you will have your hibernate.cfg.xml in the root of your class path, then have your individual mappings in the same directory as your mapped objects.

Then in you hibernate.cfg.xml can point to the mapping files in a relative path that would actually match you package structure.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic