-->
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-index with base='1' writes the list with index 0.
PostPosted: Wed Mar 01, 2006 6:32 pm 
Newbie

Joined: Tue May 24, 2005 8:14 pm
Posts: 3
Using Hibernate 3.1.2 (this was also occuring with 3.0.5) I can't seem to get a list with list-index and base='1' to work. My sequence field is always written starting with 0; the base='1' seems to be ignored. When the list is read by the same object, Hibernate complains that the sequence 0 (that it wrote) is out of bounds.

Here's the mapping:

Code:
   <list name="steps" cascade="all,delete-orphan">
         <key column="parentPtr" not-null="true" />
         <list-index column="sequence" base='1' />
         <one-to-many class="bus.Step"/>
      </list>


For some reason, the list sequence field is written starting at 0. Is this my problem, or Hibernates?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 02, 2006 6:29 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Have you studied the output during the configuration process? You'll probably see a syntax error in there. Try 'base="1"', with doublequotes, not single quotes.


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.