cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tad <>
Subject Deleting object in one-to-many relationship leaves transient
Date Wed, 22 Feb 2012 23:53:01 GMT
We're using Cayenne in a web application. Our relationship is like this:

root <- one-to-many -> children

We make a POST request, loop through some objects, and delete some using
ObjectContext.deleteObject. We then commit, no exceptions are thrown, and
ObjectContext.uncommittedObjects is empty. The DB reflects these changes.

We then redirect to a page that lists the remaining objects. However, when
using the generated root.getChildrenArray() method, it returns a list that
includes the objects which were just deleted. These objects are marked as

Is my understanding correct that we need to perform an explicit query in
order to refresh this list, rather than using the generated getter?

Thanks for any help.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message