Skip to content

Introduce RowMapper with automatic binding to fields #26594

Closed
@membersound

Description

@membersound

BeanPropertyRowMapper requires setters being present. Which is fine if you have some.

But if you only have a simple dto class for some reason, and want to make use of the mapper, it requires to create setters just for that.

It would be nice if we could have some DirectFieldRowMapper additionally, similar to:
https://gist.github.com/stianl/6629122#file-directfieldrowmapper

Spring already allows direct field mapping for mvc with DataBinder.initDirectFieldAccess().
So why not providing a direct mapper also for jdbc beans, that can simply operate on public fields?

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions