You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 overridegetId()
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.The text was updated successfully, but these errors were encountered: