#2187 - Improve error message thrown when @JoinTable @JoinColumn not satisfied.

Added " or a @JoinColumn needs an explicit referencedColumnName specified?";
This commit is contained in:
Robin Bygrave
2021-03-04 08:55:11 +13:00
parent 81e445e386
commit c86f965d36
@@ -609,7 +609,8 @@ public abstract class BeanPropertyAssoc<T> 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);
}
}