mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1461 - @OneToMany with @JoinTable without table name does not default join table name
This commit is contained in:
@@ -304,6 +304,12 @@ class AnnotationAssocManys extends AnnotationParser {
|
||||
private void readJoinTable(JoinTable joinTable, DeployBeanPropertyAssocMany<?> prop) {
|
||||
|
||||
String intTableName = getFullTableName(joinTable);
|
||||
if (intTableName.isEmpty()) {
|
||||
BeanTable localTable = factory.getBeanTable(descriptor.getBeanType());
|
||||
BeanTable otherTable = factory.getBeanTable(prop.getTargetType());
|
||||
intTableName = getM2MJoinTableName(localTable, otherTable);
|
||||
}
|
||||
|
||||
// set the intersection table
|
||||
DeployTableJoin intJoin = new DeployTableJoin();
|
||||
intJoin.setTable(intTableName);
|
||||
|
||||
Reference in New Issue
Block a user