Repository navigation
Conversation
DataClassRowMapper suppresses constructor parameters as bean properties, but suppressProperty only removed them from the mapped properties and not from the property names used by the fully populated check. As a result, a data class with setters for its constructor parameters always failed that check, even when the ResultSet contained every column. Closes spring-projectsgh-37532 Signed-off-by: Seungtaek Lim <namest504@gmail.com>
sbrannen
force-pushed
the
rowmapper-suppressed-property-check
branch
from
October 21, 2026 12:49
c7e91c8 to
9fcdc1f
Compare
BeanPropertyRowMapper
BeanPropertyRowMapperDataClassRowMapper
DataClassRowMapperDataClassRowMapper for classes with setters
Member
This comment was marked as outdated.
This comment was marked as outdated.
sbrannen
added a commit
that referenced
this pull request
Oct 21, 2026
Member
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.
DataClassRowMappersuppresses the constructor parameters of the mapped class as bean properties viasuppressProperty(), since they are populated through the constructor. However,suppressProperty()only removed the property frommappedPropertiesand not frommappedPropertyNames, which is the set compared against the populated properties whencheckFullyPopulatedis enabled.As a result, for a class with an all-args constructor and setters for its constructor parameters,
setCheckFullyPopulated(true)always failed witheven though the
ResultSetcontained every column. Records are not affected since they have no setters.This change removes a suppressed property from
mappedPropertyNamesas well, so the check only covers the properties that are actually populated via setters. Constructor parameters are still enforced throughconstructMappedInstance(), which fails for a missing column. The same code exists in 6.2.x and 7.0.x.Note: #37329 touches
mapRow()inBeanPropertyRowMapperas well, but a different part of it; this change is limited tosuppressProperty().