-->
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: No row with the given identifier exists
PostPosted: Sun Dec 28, 2008 4:31 am 
Newbie

Joined: Thu Dec 25, 2008 7:13 am
Posts: 10
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

2.0.1.4

Mapping documents:

<class name="FlexiCommerce.Components.PersistenceItem,FlexiCommerce" table="FlexiItem">
<cache usage="read-write" />

<id name="ID" column="ID" type="Int32" unsaved-value="0" access="property">
<generator class="native" />
</id>

<discriminator column="Type" type="String" />

<property name="SortOrder" access="property" not-null="true" />

<many-to-one name="Parent" column="ParentID" class="FlexiCommerce.Components.PersistenceItem,FlexiCommerce" not-null="false" lazy="proxy" fetch="select" />

<bag name="Children" cascade="all" generic="true" inverse="true" order-by="SortOrder" lazy="true">
<cache usage="read-write" />
<key column="ParentID" />
<one-to-many class="FlexiCommerce.Components.PersistenceItem,FlexiCommerce"/>
</bag>

</class>



Problem

I delete an item and the database reflects it appropriately. The problem is when my treeview attempts to get the items children that contains the deleted item (which is cached). I get "No row with the given identifier exists". This is expected since I deleted them item the cached bag is trying to get.

It would hamper my performance greatly if I disable caching. Is there a way to suppress this exception and just remove that cached non-existent item from the bag?


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.