-->
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: 3.2.0.CR1 Problem: @OneToMany -> @Embeddable
PostPosted: Tue May 16, 2006 9:06 pm 
Newbie

Joined: Tue May 16, 2006 8:54 pm
Posts: 5
After upgrading from Hibernate 3.1.2 => 3.2.0.CR1, I now have the following problem:

org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class ...

The situation is I have a @OneToMany annotation targeting an @Embeddable class. This used to work in 3.1.2. I liked this because I didn't want to make the targeted class an @Entity since it really is just a value object so I don't care about @Ids. Mapping with a @OneToMany targeting an @Embeddable took care of creating a separate table with a foreign key, etc. Is this a valid thing to do? If so, is this a regression in 3.2.0.CR1?

This "issue" seemed to start happening after this patch was checked in: http://fisheye.jboss.org/changelog/Hibernate?cs=9837


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 18, 2006 2:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
use @CollectionOfElements instead of @*ToMany if your association is not pointing to an entity

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 18, 2006 3:04 pm 
Newbie

Joined: Tue May 16, 2006 8:54 pm
Posts: 5
Thanks, that works great.


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.