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 3737 * List<Document> documents;
3838 * </pre>
3939 * <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>
4053 * 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:
4255 * <pre>
4356 * @ManyToMany
4457 * @JoinTable(name = "collaborations")
You can’t perform that action at this time.
0 commit comments