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 with inserting items in a list
PostPosted: Sun Aug 26, 2007 7:43 am 
Newbie

Joined: Thu Jun 14, 2007 3:46 am
Posts: 17
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
1.2.0.GA


Hi,

I got a problem with a list. For me is the index really imported en when i insert a new item in the list not all items get updated in the database and i get items with the same index.

the mapping files:
<list name="Items" inverse="false" lazy="false">
<key column="PlaylistPeriodId" />
<index column="Position" />
<one-to-many class="DStudioObject.NHibernate.Objects.PlaylistItem, DStudioObject" />
</list>

and :
<many-to-one name="Period" class="DStudioObject.NHibernate.Objects.PlaylistPeriod, DStudioObject" column="PlaylistPeriodId" update="true" insert="true" lazy="false" />


and insert the item with the followin code:
_playlistmanager.saveOrUpdateObject(item);

_activeplaylistperiod.Items.Insert(position, item);

now i tried to update the _activeplaylistperiod after insert, update the object i insert but nothing works. Someone an idea?


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.