-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Can hybernate "explore" an unknown database?
PostPosted: Wed Oct 12, 2005 7:02 am 
Newbie

Joined: Wed Oct 12, 2005 6:52 am
Posts: 2
Hello. I am creating a new java application that works with databases, and I am considering using Hibernate.

This application must be "plugged" on a database using a configuration file. Explanation : it is going to be used by different customers, each with their own databases, probably with different models. I want to be able to adapt the application without changing the code, simply by changing a configuration file.

Does Hibernate supports this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 8:38 am 
Newbie

Joined: Wed Oct 12, 2005 4:54 am
Posts: 9
Different databases are usually no problem for hibernate (regarding to your implementation). This is configurable within a xml-config-file.

But how do you want to implement code for 'probably different' models? With hibernate you would need different mappings...and you 'probably' might want to use the (potentially unknown) attributes beforehand.

greetx


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 9:57 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
hibernate objects can be generated on the fly using the hbm2java program. This generates the POJOs from the mapping files for each class.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 14, 2005 7:42 am 
Newbie

Joined: Wed Oct 12, 2005 6:52 am
Posts: 2
Thank, I am going to try to find information about hbm2java.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.