Package org.hibernate.annotations
Annotation Type Where
-
@Target({TYPE,METHOD,FIELD}) @Retention(RUNTIME) public @interface Where
Specifies a restriction written in native SQL to add to the generated SQL when querying an entity or collection.For example,
@Where("deleted = false")
could be used to hide entity instances which have been soft-deleted.Note that
Where
restrictions are always applied and cannot be disabled. They're therefore much less flexible thanfilters
.- See Also:
Filter
,DialectOverride.Where
-
-
Element Detail
-
clause
String clause
A predicate, written in native SQL.
-
-