Skip to content

BeanPropertyRowMapper should default primitive property when receiving null value from result [SPR-5588] #10259

@spring-projects-issues

Description

@spring-projects-issues

Greg Nieman opened SPR-5588 and commented

Submitted on behalf of support client:

BeanPropertyRowMapper should gracefully handle null return values for primitive types. Currently it will attempt to set the null value into the target bean, treating the primitive property the same way it would an Object property. In such cases, a pre-established default value would allow the retrieval to proceed. Currently the SQL for retrievals where this may occur require modification to add NVL() for all numeric fields that have the potential to be null.


Affects: 3.0 M2

Referenced from: commits 360434d, 93c56f1

Metadata

Metadata

Assignees

No one assigned

    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