File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
hibernate-core/src/main/java/org/hibernate/annotations Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 37
37
* List<Document> documents;
38
38
* </pre>
39
39
* <p>
40
+ * If a restriction declared by an entity should be applied to a to-one
41
+ * association to that entity type, the association should be mapped to
42
+ * an {@linkplain jakarta.persistence.JoinTable association table}.
43
+ * <pre>
44
+ * @ManyToOne
45
+ * @JoinTable(name = "application_document")
46
+ * Document document;
47
+ * </pre>
48
+ * The {@code SQLRestriction} annotation may not be directly applied to
49
+ * a field or property annotated {@link jakarta.persistence.OneToOne} or
50
+ * {@link jakarta.persistence.ManyToOne}, and restrictions on foreign
51
+ * key associations are dangerous.
52
+ * <p>
40
53
* The {@link SQLJoinTableRestriction} annotation lets a restriction be
41
- * applied to an {@linkplain jakarta.persistence.JoinTable association table} :
54
+ * applied to the columns of an association table:
42
55
* <pre>
43
56
* @ManyToMany
44
57
* @JoinTable(name = "collaborations")
You can’t perform that action at this time.
0 commit comments