-->
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: Session.commit() changes order of a list ?
PostPosted: Thu Jan 29, 2004 10:01 am 
JBoss jBPM Developer
JBoss jBPM Developer

Joined: Thu Aug 28, 2003 11:56 am
Posts: 30
Location: Belgium
The problem is that during a session.commit() it appears as if hibernate changes the order of a list.

DefinitionImpl.types is a property of type java.util.List
A DefinitionImpl has many TypeImpl's (1-n relation).

before the commit : DefinitionImpl.types = [type[java-type(java.util.Date) index(0)], type[java-type(java.lang.Boolean) index(1)]]
after the commit : DefinitionImpl.types = [type[java-type(java.lang.Boolean) index(0)], type[java-type(java.util.Date) index(1)]]


mapping file for class TypeImpl:
...
<property name="index" type="integer" column="index_" />
<many-to-one name="definition" class="org.jbpm.model.definition.impl.DefinitionImpl" cascade="none" />
...

mapping file for DefinitionImpl.types
...
<list name="types" lazy="true" cascade="all">
<key column="definition" />
<index column="index_" />
<one-to-many class="org.jbpm.model.definition.impl.TypeImpl" />
</list>
...


Can anybody see what I'm doing wrong ?
Has anybody got a tip or suggestion on why the commit changes the order and updates the indexes ?

Regards, Tom.


Top
 Profile  
 
 Post subject: sorry, my programming fault
PostPosted: Thu Jan 29, 2004 10:16 am 
JBoss jBPM Developer
JBoss jBPM Developer

Joined: Thu Aug 28, 2003 11:56 am
Posts: 30
Location: Belgium
I'm sorry, I found the bug.
It was my programming mistake.

Regards, Tom.


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.