-->
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: Uni Directional Set Based OneToMany Association
PostPosted: Wed Jan 30, 2008 6:37 am 
Newbie

Joined: Wed Jan 30, 2008 6:25 am
Posts: 1
Hi,

I am new to Hibernate Annotations and trying to annotation the following mapping.

Code:
<set table="child_table" lazy="false" name="tablename1">
      <key column="parentid" not-null="false"/>
      <one-to-many class="classname"/>
      <filter condition="filtercondition" name="filtername"/>
    </set>

Please help me on how to annotate a Unidirectional set based OneToMany Association.

Code:
@CollectionOfElements(fetch=FetchType.EAGER,targetElement = classname.class)
@FilterJoinTable()


Quote:
If I dont use @JoinTable, Iam getting the error as :Invalid Object Name parent_table_child_table


Is it necessary to use @JoinTable along with this unidirectional onetomany association? If so, how will I map the table and the Columns?


Thanks,
Babloo


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.