-->
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: Hibernate non-nullable list-index
PostPosted: Sat Dec 17, 2016 11:45 am 
Newbie

Joined: Sat Aug 27, 2016 11:17 am
Posts: 12
I have a mapping similar to the following and it seems that the index column is not populated during the DB INSERT statement because the DB complains about index being NULL. However, if I make the index column nullable it works as expected.

Code:
<list name="someList">
    <key column="someFk"/>
    <list-index column="index"/>
    <one-to-many class="SomeClass"/>
</list>


Is there a way to force Hibernate to populate the index while inserting? I'm sure there must be a way but I've looked into the docs and couldn't find anything.

---

I also asked the question on SO: http://stackoverflow.com/questions/4119 ... list-index


Top
 Profile  
 
 Post subject: Re: Hibernate non-nullable list-index
PostPosted: Mon Jan 09, 2017 5:07 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
I answered it on StackOverflow.


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.