From c86f965d36a280f5a323aa7873a726bbd87d4994 Mon Sep 17 00:00:00 2001 From: Robin Bygrave Date: Thu, 4 Mar 2021 08:55:11 +1300 Subject: [PATCH] #2187 - Improve error message thrown when @JoinTable @JoinColumn not satisfied. Added " or a @JoinColumn needs an explicit referencedColumnName specified?"; --- .../java/io/ebeaninternal/server/deploy/BeanPropertyAssoc.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssoc.java b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssoc.java index a2a091ef6..739021196 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssoc.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssoc.java @@ -609,7 +609,8 @@ public abstract class BeanPropertyAssoc extends BeanProperty implements STree String msg = "Error with the Join on [" + getFullBeanName() + "]. Could not find the matching foreign key for [" + matchColumn + "] in table[" + searchTable + "]?" - + " Perhaps using a @JoinColumn with the name/referencedColumnName attributes swapped?"; + + " Perhaps using a @JoinColumn with the name/referencedColumnName attributes swapped? " + + " or a @JoinColumn needs an explicit referencedColumnName specified?"; throw new PersistenceException(msg); } }