Skip to content

Automatically resolve identity field using persistence-specific annotationsΒ #113

@adrienlauer

Description

@adrienlauer

Currently, it is necessary to mark the identity field of an entity with @Identity for the business framework to recognize the field as the identity (thus avoiding the need to override getId() which is always possible).

This leads to an annotation overload on the identity field. Also developers tend to not understand why it is necessary to put the @Identity annotation in addition to the already required persistence annotation.

We could create an IdentityResolver interface in the business framework that could be implemented in the various persistence add-ons to allow to understand persistence annotations directly. This should work in a static context (without injection) because identity fields are detected statically one-time per class.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions