diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/Filter.java b/hibernate-core/src/main/java/org/hibernate/annotations/Filter.java index 729bc60f38ec..fb08c8f791d1 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/Filter.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/Filter.java @@ -33,6 +33,16 @@ * } * *

+ * Similarly, the filter could be applied to a one-to-many association + * like this: + *

+ * @OneToMany(mappedBy = "provider")
+ * @Filter(name = "Current",
+ *         deduceAliasInjectionPoints = false,
+ *         condition = "{alias}.year = extract(year from current_date)")
+ * List<Course> courses;
+ * 
+ *

* If an entity or collection has no {@code @Filter} annotation * with the name of a given filter, it is not affected by that * filter.