Skip to content

Add a EntityConverter for mapping between entity identifiers and entity references [SPR-6374] #11040

@spring-projects-issues

Description

@spring-projects-issues

Keith Donald opened SPR-6374 and commented

Needed by Roo.
Proposal:

  • When binding a String entity id to a entity reference field, look for a static method on entityType named find<EntityName>(<IdType> id). If found, invoke that method to load the entity reference
  • When printing a entity reference as a field, look for a method named getId() to retrieve fetch the id value, then convert the value to String.

Affects: 3.0 RC2

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