-->
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: Value - Based Mapping
PostPosted: Wed Feb 16, 2005 10:36 pm 
Newbie

Joined: Wed Feb 16, 2005 10:22 pm
Posts: 1
Hibernate version: 2 or 3

Mapping documents:

I have a unique system where there are not domain objects. all the objects are extended "xml-like-name-value objects"

I have various value objects:
Object1
Object2
Object3

My Object Model does not have Object1, 2, 3 but it has object and I store all the properties of the object in name and values for example

So the in-memory representation of Object1 will be

Name Value
URI uri:object1
Object1Prop1 true

And similarly Object2 will be
Name Value
URI uri:object2
Object2Prop1 true

Also the relationships Object1 - Object2 are stored seperately in the memory.

How will hibernate which requires one class per table persist these types of objects? I dont have a getter or setter since I dont have the objects at all. all objects are just name values pairs. I have to implement this type of design because of some business flexibility requirement

Based on the Value of these type of object, I would like to "route" them to respective tables. in short, I would like to havev data-based mapping, if the URI's value is uri:object1, persist in Object1 Table, if URI's value is uri:object2, persist in object2 table, and so on. and based on the relastionship, say object1- object2, persist the primary key foriegn key appropriately?

How will I achieve this using hibernate? can I do this in hhibernate?


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.