-->
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: Wrapped Collection
PostPosted: Tue Sep 14, 2004 12:50 pm 
Beginner
Beginner

Joined: Mon May 03, 2004 1:25 pm
Posts: 31
Hibernate version:3

I have one-to-many relationship where the many side is inside a non-persistent wrapper object:
Code:
GeoGroup{
private SampleSet sampleSet;
}

SampleSet{
private Collection samples
}



GeoGroup and the collection of samples need to be persisted as a one-to-many relationship. SampleSet is not presisted.

Any pointers on how to map this?

thanks,
tim


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 14, 2004 3:33 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Map a private get/set pair returning the wrapped collection.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2004 10:20 am 
Beginner
Beginner

Joined: Mon May 03, 2004 1:25 pm
Posts: 31
Is there a way to create a UserType to define this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2004 10:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Custom PropertyAccessor would be easier in that case, i suppose


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.