-->
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: @OneToMany with a String
PostPosted: Thu Dec 07, 2006 9:10 am 
Newbie

Joined: Thu Dec 07, 2006 9:04 am
Posts: 2
Hi the list !

I'm using annotation and the last GA version.

I'd like to have an one to many association like that :

Code:
public class A {
   @Basic
   @OneToMany
   private Collection<String> names = new ArrayList<String>();
}


It look like simple and use to work with some beta version of Hibernate annotation I used (I can't remember witch one but I could dig on CVS)

I got that exeption at initialisation time, the application don't even start.
Code:
Use of @OneToMany or @ManyToMany targeting un unmapped class A.names[java.lang.String]

I'm confused (because it used to work) and need your help...

Thenks !


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 07, 2006 9:40 am 
Newbie

Joined: Thu Dec 07, 2006 9:04 am
Posts: 2
I think I found a clue ... I found an answer from and old post in JBoss forum.

In that case use @CollectionOfElements rather @*ToMany.
I'll dig that.

Thanks for my Help :-)


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.