-->
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: List collections in inheritance
PostPosted: Fri Jan 09, 2004 5:17 pm 
Beginner
Beginner

Joined: Fri Nov 28, 2003 11:21 am
Posts: 49
Location: Buenos Aires, Argentina
Can i use List Collections in joined-subclasses ?
Something like:


<joined-subclass name="Products.Product" table="T_Product">
<key column="P_IdProduct"/>
<many-to-one name="organizacion" class="Common.Organizacion" column="F_IdOrganizacion"/>
<list name="suplementos" lazy="false" cascade="all" inverse="true">
<key column="P_IdSuplement"/>
<one-to-many class="Products.Product"/>
</listt>
</joined-subclass>

Hibernate throws the following Exception
18:15:48,668 INFO Configuration:300 - Mapping resource: Productos/ElementoEditorial.hbm.xml
18:15:48,758 ERROR XMLHelper:48 - Error parsing XML: XML InputStream(18) Element "list" does not allow "one-to-many" here.
18:15:48,788 ERROR XMLHelper:48 - Error parsing XML: XML InputStream(19) Element "list" requires additional elements.
18:15:48,788 INFO Binder:225 - Mapping class: Productos.ElementoEditorial -> T_ElementoEditorial


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 09, 2004 7:57 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
Yep, I use lists in joined-subclasses all over the place.

First, you need an index.

From the DTD:
Code:
<!ELEMENT list (
   meta*,
   (cache|jcs-cache)?,
   key,
   index,
   (element|one-to-many|many-to-many|composite-element|many-to-any)
)>


Also the ending tag "</listt>" will mess you up too. :)


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.