persistence
persistence copied to clipboard
Proposal - Standardize @Subslect
Good morning everyone, It would be interesting to standardize the behavior of Hibernate's @Subselect annotation. I was thinking of doing this through a dedicated annotation of this type:
@Documented @Retention(RUNTIME) @Target(ElementType.TYPE) public @interface VirtualEntity { String query(); boolean nativeQuery() default false; }
The idea is to specify a JPQL query as the default behavior, with the option to force it to a native query when necessary. What do you think?