-->
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: Collection of components for a many-to-many association
PostPosted: Mon Mar 14, 2005 12:08 pm 
Newbie

Joined: Wed Feb 23, 2005 9:01 am
Posts: 9
Location: London
Hello

On page 229 of Hibernate in Action it says "We omitted the accessors and equals() and hashCode() methods". How would these methods look if they were implemented?

<set name="items" lazy="true" table="CATEGORY_ITEMS">
<key column="CATEGORY_ID"/>
<composite-element class="CategorizedItem">
<parent name="category">
<many-to-one name="item"
class="Item"
column="ITEM_ID"
not-null="true"/>
<property name="username" column="USERNAME" not-null="true"/>
<property name="dateAdded" column="DATE_ADDED" not-null="true"/>
</composite-element>
</set>

Thanks

Mark


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.