cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tad <tadfis...@gmail.com>
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
transient.

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.

--
Thanks,
Tad

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