-->
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: Why must specify the class in <nested-composite-element&g
PostPosted: Thu May 26, 2005 4:51 am 
Newbie

Joined: Mon Jan 17, 2005 5:43 am
Posts: 13
Location: Macau
Hi,

Given a mapping like:
Code:
class Foo {
   int fooId;
   Set values;
}
class ContactInfo {
   TelNo telNo;
   Address address;
}
class TelNo {
   String countryCode;
   String areaCode;
   String localNo;
}

<hibernate-mapping>
   <class name="Foo">
      <set name="values" table="Value">
         <key column="fooId"/>
         <composite-element class="ContactInfo">
            <nested-composite-element name="telNo" class="TelNo">
               <property name="countryCode"/>
               <property name="areaCode"/>
               <property name="localNo"/>
            </nested-composite-element>
         </composite-element>
      </set>
   </class>
</hibernate-mapping>


I don't understand why we have to specify the class="TelNo" in the <nested-composite-element>. After all, it can find out the class of the "telNo" property of the ContactInfo class.

TIA for any info!


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.