Well,
before the fix the check was not doing anything at all. It was checking that the detached object was
in deleted objects, but the object being merged is never going to be managed,
so never going to be in deleted objects, so the validation would never occur. It is far better off than it was, and the
test now passes.
It should
not be that relevant that the object is changed, because it is deleted, and
because the exception will trigger a rollback anyway. Otherwise the check for deleted would need to be done inside of
the UnitOfWork merge operation, after it has found the object to merge into. This would probably be better in general
because the current validation inside of EntityManager will also not catch
nested deleted objects.
-----Original
Message-----
From: GORDON.YORKE@xxxxxxxxxx
Sent: Monday, May 26, 2008 11:31
AM
To: Dev mailing list for Eclipse
Persistence Services
Subject: Re: [eclipselink-dev]
SVN: commit bug#232531, 232553, 232568, 232571, 232574, 232566, 232564, 232562,
232557, 232529, 232525, 232521 fixed several test failues
Hello James,
The fix to EntityManagerImpl for the 'merge for deleted
objects' violates the specification. The specification (section 3.2.2)
requires that the state of the Entity 'be that of the Entity at point at which
the remove operation was called. This patch merges the changes from the
detached object first then validates against the deleted objects. This
merge will update the state of the removed Entity causing it to be different
than when remove() was called on the Entity.
--Gordon
JAMES.SUTHERLAND@xxxxxxxxxx
wrote:
SVN: commit bug#232531, 232553, 232568, 232571, 232574,
232566, 232564, 232562, 232557, 232529, 232525, 232521 fixed several test
failures
https://bugs.eclipse.org/bugs/show_bug.cgi?id=232525
Changes:
-
Fixed several test failures.
--
XDB XML project support not working.
--
Some test case issues.
--
Bug in validation in merge for deleted objects.
--
Lazy init login platform.
--
Added isWeavingEnabled() check for tests that require weaving.
Code
Review; Edwin (pending)
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev