-->
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: problem during using <list> element
PostPosted: Tue Aug 16, 2005 4:41 am 
Newbie

Joined: Wed Dec 08, 2004 12:28 pm
Posts: 8
I want to use Parent/Child-architectur with the <list>-element , but this makes some problems in Hibernate 3.0.5:

mappings:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate
<hibernate-mapping>
<class name="Parent" table="parent">
<id
name="id"
column="id"
unsaved-value="0"
>
<generator class="native"/>
</id>

<property name="name" column="name" type="string"/>

<list name="children" cascade="all" inverse="true">

<key column="parent_id" not-null="true"/>

<list-index column="idx"/>

<one-to-many class="Child"/>

</list>
</class>

<class name="Child" table="child">

<id
column="id"
name="id"
unsaved-value="0">
<generator class="native"/>
</id>

<property name="name" column="name" type="string"/>
<many-to-one name="parent" class="Parent" column="parent_id" not-null="true"/>
</class>
</hibernate-mapping>

But when in Parent-Mapping I exclude the inverse-attribut and in Child-Mapping I also exclude the many-to-one-Element all thing run good

Can someone tell me why this make problem ?

Thanks for advance..


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.