Skip to content

Leniently resolve entities during property path traversal - #3517

Open
mp911de wants to merge 3 commits into
mainfrom
issue/3515
Open

Leniently resolve entities during property path traversal#3517
mp911de wants to merge 3 commits into
mainfrom
issue/3515

Conversation

@mp911de

@mp911de mp911de commented Jul 28, 2026

Copy link
Copy Markdown
Member

We now rely on MappingContext.getPersistentEntity(…) for persistent entity resolution instead of validating PersistentProperty.isEntity(…) ourselves. isEntity considers key and value types when using Map types whereas getPersistentEntity(…) only considers the value type for property path traversal. This difference in behavior caused MappingException during property path traversal amplified by eager auditing metadata resolution.

Additionally, we leniently resolve a backing persistent entity when obtaining property paths from a collection or map type as MappingContext contains registrations for Map-based entity types that resolve to a raw Map type erasing type parameters.

Closes #3515

mp911de added 3 commits July 28, 2026 11:45
We now rely on MappingContext.getPersistentEntity(…) for persistent entity resolution instead of validating PersistentProperty.isEntity(…) ourselves. isEntity considers key and value types when using Map types whereas getPersistentEntity(…) only considers the value type for property path traversal. This difference in behavior caused MappingException during property path traversal amplified by eager auditing metadata resolution.

Additionally, we leniently resolve a backing persistent entity when obtaining property paths from a collection or map type as MappingContext contains registrations for Map-based entity types that resolve to a raw Map type erasing type parameters.
Fix Javadoc to reflect API behavior.
@mp911de mp911de added the type: regression A regression from a previous release label Jul 28, 2026
@mp911de
mp911de force-pushed the main branch 3 times, most recently from bde036c to adb1c6d Compare August 4, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: regression A regression from a previous release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MappingAuditableBeanWrapperFactory fails with Couldn't find PersistentEntity

2 participants