rzo1 opened a new pull request, #205:
URL: https://github.com/apache/openjpa/pull/205

   Half of this report held. A transient instance is not in fact accepted 
silently — `ImplHelper.isManageable()` returns true for an instance of a known 
entity type, so the `!isManageable` early return never fired for the case it 
documents; it was dead code that assumed detached with no evidence, and is 
removed, which restores the clear cascade-persist error. The datastore probe 
was real: `isDetached(obj, true)` issued a `SELECT` per such reference per 
flush even when the identity was unset (confirmed with SQL tracing on an 
instance whose id was null). `BrokerImpl` now reads the primary key values off 
the instance — handling `@EmbeddedId`, property access and the version field — 
and skips the lookup when no identity was ever assigned, while still probing 
for a primitive key of 0 with no value strategy, since that is a legal assigned 
key for a detached entity. New tests cover the transient case with and without 
an assigned id, the detached case, and the removed round trip as an 
 SQL count; verified on Derby and H2 (495 tests, the one failure pre-existing 
on master).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to