Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate configuration

 
souha jerbi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am working on hibernate and it seems that there a default path for the Hibernate.cfg.xml file so i want to force a new path .
thanks a lot
 
Reehan Lalkhanwar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put it anywhere under the class path or in the project path and while initializing use something like the below.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do this with the Configuration class. Have a look as the JavaDocs for Configuration and its configure method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic