Specification
https://github.com/jakartaee/data/blob/main/api/src/main/java/jakarta/data/repository/Find.java
I need clarification on ...
Jakarta Data supports projections using Java records with @Select to map entity attributes:
public record Name(String firstName,
String middleName,
@Select("lastName") String surname) {}
Currently, there is no annotation to explicitly declare a record as a projection target. This creates ambiguity for annotation processors and tooling that aim to generate metadata or validate mappings at compile time.
Should Jakarta Data define a dedicated annotation (e.g., @Projection) to mark these records as intended for projections, or should it be left to individual Jakarta Data providers to infer and handle this as needed?
This would not impact runtime behavior but would enhance compile-time clarity and tooling support.
Additional information
No response
Specification
https://github.com/jakartaee/data/blob/main/api/src/main/java/jakarta/data/repository/Find.java
I need clarification on ...
Jakarta Data supports projections using Java records with
@Selectto map entity attributes:Currently, there is no annotation to explicitly declare a record as a projection target. This creates ambiguity for annotation processors and tooling that aim to generate metadata or validate mappings at compile time.
Should Jakarta Data define a dedicated annotation (e.g., @Projection) to mark these records as intended for projections, or should it be left to individual Jakarta Data providers to infer and handle this as needed?
This would not impact runtime behavior but would enhance compile-time clarity and tooling support.
Additional information
No response