-->
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.  [ 2 posts ] 
Author Message
 Post subject: one-to-many and user type
PostPosted: Thu Jan 29, 2004 5:54 pm 
Newbie

Joined: Tue Jan 27, 2004 3:26 pm
Posts: 18
Hello,

Is there a simple way to map a one-to-many assosiation to custom Collection type (wrapper that holds Vector of elements of some type)? I read documentation and looked at examples and hibernate test cases, but didn't see any hint. Looks that CompositeUserType colud be suitable, but I cant find any example of use CompositeUserType in one-to-many assosiation. Any help would be appreciated.

regards,
Artur


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 6:36 pm 
Beginner
Beginner

Joined: Thu Nov 20, 2003 12:29 pm
Posts: 39
i had a same problem, if i understood you right.

A--1-----------n--B

B is a Collection right?

If it is, you could solve that in following way:

B(the wrapper for the Collection) stands itself in a one-to-many relationship with Class C, which uses "any type mapping"


Don't know if there is a better solution, but this works..


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