HHH-14940 loosen a check

This commit is contained in:
Gavin King 2022-10-27 18:38:45 +02:00
parent 335e480735
commit 1f4c8f7b19
1 changed files with 2 additions and 1 deletions

View File

@ -1240,7 +1240,8 @@ public abstract class CollectionBinder {
if (!isMappedBy
&& oneToMany
&& property.isAnnotationPresent( OnDelete.class )
&& !property.isAnnotationPresent( JoinColumn.class )) {
&& !property.isAnnotationPresent( JoinColumn.class )
&& !property.isAnnotationPresent( JoinColumns.class )) {
String message = "Unidirectional one-to-many associations annotated with @OnDelete must define @JoinColumn: ";
message += qualify( propertyHolder.getPath(), propertyName );
throw new AnnotationException( message );