HHH-14940 loosen a check
This commit is contained in:
parent
335e480735
commit
1f4c8f7b19
|
@ -1240,7 +1240,8 @@ public abstract class CollectionBinder {
|
||||||
if (!isMappedBy
|
if (!isMappedBy
|
||||||
&& oneToMany
|
&& oneToMany
|
||||||
&& property.isAnnotationPresent( OnDelete.class )
|
&& 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: ";
|
String message = "Unidirectional one-to-many associations annotated with @OnDelete must define @JoinColumn: ";
|
||||||
message += qualify( propertyHolder.getPath(), propertyName );
|
message += qualify( propertyHolder.getPath(), propertyName );
|
||||||
throw new AnnotationException( message );
|
throw new AnnotationException( message );
|
||||||
|
|
Loading…
Reference in New Issue