Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
Bartender
Posts: 18467
61
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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!