-->
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: Probleme mit bidirektionaler Liste
PostPosted: Tue Jul 25, 2006 2:13 am 
Newbie

Joined: Wed Jul 05, 2006 2:51 am
Posts: 1
Hallo Allerseits,

ich habe schon einen großen Teil eines Datenmodels in Hibernate, habe jedoch ein Problem. Das Datenmodel enthält Metadaten für Express, eine Klassen hat dabei eine Liste mit Attributen, die Reihenfolge ist wichtig.

In Java sieht das so aus:


public class EntityDataType extends DataType {
private List declaredAttributes = new ArrayList();
...
}

public class AttributeType {
private EntityDataType entityType;
protected DataType type;
...
}

Das Mappin sieht so aus
<hibernate-mapping>

<class name="com.prostep.part11.DataType" table="DATA_TYPE">

<joined-subclass name="com.prostep.part11.EntityDataType" table="ENTITY_DATA_TYPE">
<key column="DATA_TYPE_ID"/>

<list name="declaredAttributes" >
<key column="ATTRIBUTE_ID"/>
<index column="idx"/>
<one-to-many class="com.prostep.part11.AttributeType"/>
</list>

</joined-subclass>


<hibernate-mapping>

<class name="com.prostep.part11.AttributeType" table="ATTRIBUTE_TYPE">
<id name="id" column="ATTRIBUTE_ID">
<generator class="assigned"/>
</id>

<many-to-one name="type" column="TYPE" not-null="true"/>
<many-to-one name="entityType" column="ENTITY_TYPE" class="com.prostep.part11.EntityDataType" not-null="true"/>

Beim Laufen des Beispiels bekomme ich

08:01:53,610 ERROR JDBCExceptionReporter:72 - failed batch
2113 [main] ERROR org.hibernate.util.JDBCExceptionReporter - failed batch
08:01:53,610 ERROR AbstractFlushingEventListener:300 - Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)

Kann mir jemand eine Tip geben, was ich da mit dem Mapping falsch mache ?

Danke, Carsten


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.