Repository navigation
Conversation
solomax
reviewed
Oct 24, 2026
solomax
approved these changes
Oct 24, 2026
… converted as a whole The proxy of such a collection only sees adds and removes, so a change made inside an element was never written. The converted value of these fields is now saved when they are loaded, and compared once before each flush; a field whose converted value differs is marked dirty.
…onverted value check - merge() of a detached instance whose element was changed in place now marks the field dirty when its converted value differs. - An AUTO flush before a query checks these fields first. - A converter that cannot convert to the database no longer breaks loading. - A dirty field is not converted again by the check, and the value written at flush becomes the new saved value.
…igration considerations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported on #220 by @ilgrosso: changing an element of a converted
List<PlainAttr>in place produced noUPDATE. The spec requires it ("Synchronization to the Database": a modification includes "modification of a mutable value of a persistent property or field").The collection proxy only tracks adds and removes. For collection and map fields converted as a whole, the converted value is now saved on load and compared before each flush, before an AUTO flush for a query, and on merge; a field whose value differs is marked dirty. The broker holds these instances weakly. Other fields are not affected.
Cost: one
convertToDatabaseColumncall per load of such a field, and one per flush for each such instance still in the persistence context.Based on #220 (OPENJPA-3017).