Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

persistence and transactions: One-to-many consistency problem

Hi,

we have the following problem: We have two persistent classes A and B that are connected via a one-to-many (1:n) relationship. Now we

1. get an object "a" of class A and a number of related objects of class B from the persistence manager. Then we

3. delete the relationship between "a" and one object of class B. Then (without commit)

4. the GUI requests to show all related Bs for our given "a" and:

5. the query returns also the "deleted" object.

All these steps are performed within the same (object oriented) top level transaction.

The reason for this seems clear to us: The removal of the B has not been persisted in the DB. However, we don't really know how to deal with it...

Any suggestion is welcome.

Christoph

Former Member
Not what you were looking for? View more on this topic or Ask a question