Annotation Interface NamedNativeQuery


@Target({TYPE,PACKAGE,MODULE}) @Retention(RUNTIME) @Repeatable(NamedNativeQueries.class) public @interface NamedNativeQuery
Declares a named query written in native SQL.

Whereas the JPA @NamedNativeQuery annotation allows custom settings specific to Hibernate to be specified via stringly-typed query hints, this annotation is completely typesafe.

Note that the members of this annotation correspond to hints enumerated by AvailableHints.

This annotation may also be applied to a package-info.java or module-info.java, which is a convenient location for query declarations not specific to any particular entity.

See Also: