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: Lazy one-to-one or something else?
PostPosted: Wed Jul 02, 2008 3:33 pm 
Newbie

Joined: Wed Jul 02, 2008 3:23 pm
Posts: 1
Here is my database schema:

Table OBJECT
id

Table OBJECT_VERSION
id
PrevVersionID
ObjectID


Here are my classes:

class Object
{
Object_version version;
}

class Object_version
{
Object_Version previous_version;
Object object;
}

How to map this in a way that I would be able to save new instances of
Object_Version and set reference to previous version, but when I load
Object, only 1 Object_version gets loaded (not others that are in a chain)?

How should mappings for Object and Object_Version look like?


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.