-->
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: Dynamic Class support with Hibernate
PostPosted: Fri Feb 27, 2004 9:44 am 
Beginner
Beginner

Joined: Tue Feb 17, 2004 7:53 am
Posts: 24
Hello ,

I am looking for a Design pattern/Strategy/feature with Hibernate to Implement Dynamic/Client Configurable table structure.

After going through the Diff. topics in forum I have not got much clue whether it can be done using Hibernate or not.

If It can be achived using Hibernate, How some pointer will be a great help.

Requirement is

We have some base entities defined like

Item

And user/client can add Diff. types of Items with diff. set of Atributes with common basic properties at run time under this Category (Sort of inheritance in oo terminology)

Like

Printer
Cooking Gas
Fan

Etc.

Looking for some way how this can be implemented using Hibernate AT RUNTIME


- Anjali


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 27, 2004 9:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
There is some info about that under http://www.hibernate.org/171.html -However I would really not recommend getting to dynamic with your class mappings, this will really cause much trouble. Rather thing about using an entity-attribute-value approach for the dynamic parts of your application, refer to this thread: http://forum.hibernate.org/viewtopic.php?t=928399


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2004 8:21 am 
Beginner
Beginner

Joined: Tue Feb 17, 2004 7:53 am
Posts: 24
I think I failed to explain my query completely. I am looking for a support from Hibernate to provide class definition / object creation of the new configuration at runtime. Example - when a new Item is added into the system

REPLY :
There is some info about that under http://www.hibernate.org/171.html -However I would really not recommend getting to dynamic with your class mappings, this will really cause much trouble.

Anjali : I have gone through this link earlier and almost all the documentaion provided by Hibernate and serahxed forum also , Only info I got is that dynamci class will be supported in 2.2 version, nothing more on dynamic class. I agree that you guys will deinitely add the info in docs witth release, But for me to move ahead , Can hibernate team help in telling me an exact answer whether it can be satisifed or not.
If I am not clear Please let me know ..

Also, when u saydynamic with your class mappings, this will really cause much trouble. - Can you throw light on this , then why dynamic class tag is there for?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2004 8:27 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You need an EAV approach, read the thread linked in the posting by Michael and search with Google to understand what EAV is. It can be mapped with Hibernate 2.1.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.