-->
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.  [ 3 posts ] 
Author Message
 Post subject: Mapping question
PostPosted: Thu Apr 06, 2006 5:52 pm 
Newbie

Joined: Tue Jan 11, 2005 2:26 pm
Posts: 15
Hi,

I'm using hibernate v 3.0.5 and I have a mapping question.

I have two classes

public class DocumentContent {
private Document doc;
}

public class Document {
private Set revisions = new HashSet(); // set of DocumentContent

private Set drafts = new HashSet(); // set of DocumentContent
}

How would I map the document class so that it has two seperate sets of DocumentContent objects?

Obviously, DocumentContent maps to the same table.

Thanks,
-Ben


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 06, 2006 6:32 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
Try using "where" attribute
http://www.hibernate.org/hib_docs/v3/re ... ns-mapping

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 06, 2006 7:25 pm 
Newbie

Joined: Tue Jan 11, 2005 2:26 pm
Posts: 15
Thanks!

-Ben


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.