-->
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 in generating ID when usingTableHiloGenerator
PostPosted: Wed Oct 05, 2005 6:23 am 
Newbie

Joined: Wed Oct 05, 2005 4:58 am
Posts: 2
I am new to Hibernate stuff. Actually I am using WebSphere5.1.2 and CloudScape V5.1. And I am using dialect as below
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>

And my CMODOne.hbm.xml looks like this

<hibernate-mapping>
<class name="com.hibernate.CMODModuleOne" table="CMODMODULEONE">
<id name="CMODOneID" column="CMODONEID">
<generator class="org.hibernate.id.TableHiLoGenerator">
<param name="table">MODULEMASTERS</param>
<param name="column">LASTTRANSCATIONNO</param>
</generator>
</id>
<property name="description"/>
</class>
</hibernate-mapping>

Step1:When I try to insert a row in the CMODMODULEONE table, the LASTTRANSCATIONNO coloumn of MODULEMASTERS table was getting updated once(as "1"). And the CMODONEID column of CMODMODULEONE was showing "1". ( This is executing perfectly. Problem comes in the next step)

Then When I try to add inserting two row after the above step 1 in the CMODMODULEONE table, the LASTTRANSCATIONNO coloumn of MODULEMASTERS table was getting updated once(changed to "2") and another entry with "0" has been inserted. And the CMODONEID column of CMODMODULEONE was showing "1", "32768","32769".

It should update as "3" in the LASTTRANSCATION column of MODULEMASTERS table and the CMODONEID column of CMODMODULEONE would show "1", "2","3". Instead of this it was showing incorrectly.

Can anyone help me regarding this..

Any solution is highly appreciated.

Thanks,
A.C.Vinith Kumar


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.