-->
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.  [ 1 post ] 
Author Message
 Post subject: dynamic classes
PostPosted: Thu Jan 24, 2008 1:10 pm 
Newbie

Joined: Wed Jan 23, 2008 5:59 pm
Posts: 1
hi, i'm a hibernate noob.

the problem i am having is mapping to classes that are of unknown structure at startup time. i.e. i have no java class or XML at startup time.
a db table contains the data structure; this must be read first.

i.e. if a there is a table = {name:String, id:String, salary:int} then i need to configure a hibernate object accordingly after startup.
new Configuration().addXML(someGeneratedTable2XMLString);
from what i understand i can't do that once a session factory is built.

because new objects may be defined dynamically, i'd have to rebuild the session factory.

questions :
is it ok to rebuild a session factory. this sounds dubious to me
is there another way to accomplish this? i read something about a dynamic-class feature but never found the docs...it may be a new/future thing?
would i be better off just using JDBC or some non OR tool to do this?

thanks


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

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.