-->
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: Custom collection with Hibernate/Annotations
PostPosted: Wed May 02, 2012 6:27 am 
Newbie

Joined: Wed May 02, 2012 5:35 am
Posts: 3
Hi,

I have an application running with Hibernate/XML. I use a custom collection (concret implementation of java.util.List) for all many-to-one relationships. I implemented a custom property access (DirectPropertyAccessor) to map the Hibernate collection (PersistentBag) to my custom collection. I am actually moving my application to Hibernate/Annotations. I got this message : org.hibernate.AnnotationException: Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements.

How should I migrate my application to Annotations without being forced to rewrite all many-to-one relationships locations (using java.util.List instead of the custom collection)?

Regards


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.