Fix PropertyFinder not discovering inherited getter/setter pairs in METHODS mode#4269
Draft
evanchooly wants to merge 1 commit into
Draft
Fix PropertyFinder not discovering inherited getter/setter pairs in METHODS mode#4269evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
…ETHODS mode discoverPropertyMethods() only inspected the immediate ClassNode, so getter/setter pairs declared in parent classes were silently omitted when PropertyDiscovery.METHODS was active. This caused child entities to have no properties at all if all their property accessors came from a base class. Walk the superclass chain the same way discoverAllFields() already does, tracking seen property names so a subclass override takes precedence over the parent's method. https://claude.ai/code/session_01788qAtGdn41QnwBvd8JeJr
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.
Summary
discoverPropertyMethods()only inspected the immediateClassNode, so getter/setter pairs declared in parent classes were silently omitted whenPropertyDiscovery.METHODSwas activediscoverAllFields()already does; subclass overrides take precedence via aseenmapTest plan
TestCritterMapper#testInheritedGetterDiscoveryInMethodsMode— new test withMethodsBase(definesgetName/setName) andMethodsChild extends MethodsBase(@Entity); verifiesnameproperty is discoveredTestCritterMappertests passhttps://claude.ai/code/session_01788qAtGdn41QnwBvd8JeJr
Generated by Claude Code