Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

write hibernate.cfg.xml externally

 
harshad kadam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using hibernate. Is it possible to write a system file containing database information which will reflect to hibernate.cfg.xml ??
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Look at the various methods available to you in the Configuration class. How you decide to configure Hibernate is really up to you.
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are utilities that will scan a live database to pick up schema information and use it to generate hibernate files, including object model class files, with or without annotations. Take a look at the Hibernate Tools. You'll even find IDE plugins that can help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic