Merge pull request #3011 from ebean-orm/feature/improve-error-message-no-join-columns

Improve the error message "No join columns found" to include the relationship
This commit is contained in:
Rob Bygrave
2023-03-27 21:45:46 +13:00
committed by GitHub
@@ -932,7 +932,7 @@ public final class BeanDescriptorManager implements BeanDescriptorMap, SpiBeanTy
// define the TableJoin
DeployTableJoin oneToManyJoin = oneToMany.getTableJoin();
if (!oneToManyJoin.hasJoinColumns()) {
throw new RuntimeException("No join columns");
throw new RuntimeException("No join columns found to satisfy the relationship " + oneToMany);
}
createUnidirectional(targetDesc, owningType, beanTable, oneToManyJoin);
}