mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#123 - Mapping - Add support for OneToMany JoinTables
This commit is contained in:
1 parent
8d0df6541e
commit
81d48d67a7
22 files changed
+478
-88
No files matched your search
@@ -12,8 +12,8 @@ import io.ebeaninternal.api.SpiQuery.Mode;
|
||||
import io.ebeaninternal.server.deploy.BeanDescriptor;
|
||||
import io.ebeaninternal.server.deploy.BeanProperty;
|
||||
import io.ebeaninternal.server.deploy.BeanPropertyAssoc;
|
||||
import io.ebeaninternal.server.deploy.BeanPropertyAssocOne;
|
||||
import io.ebeaninternal.server.deploy.BeanPropertyAssocMany;
|
||||
import io.ebeaninternal.server.deploy.BeanPropertyAssocOne;
|
||||
import io.ebeaninternal.server.deploy.DbReadContext;
|
||||
import io.ebeaninternal.server.deploy.DbSqlContext;
|
||||
import io.ebeaninternal.server.deploy.InheritInfo;
|
||||
@@ -597,7 +597,7 @@ class SqlTreeNodeBean implements SqlTreeNode {
|
||||
|
||||
if (nodeBeanProp instanceof BeanPropertyAssocMany<?>) {
|
||||
BeanPropertyAssocMany<?> manyProp = (BeanPropertyAssocMany<?>) nodeBeanProp;
|
||||
if (manyProp.isManyToMany()) {
|
||||
if (manyProp.hasJoinTable()) {
|
||||
|
||||
String alias = ctx.getTableAlias(prefix);
|
||||
String[] split = SplitName.split(prefix);
|
||||
|
||||
@@ -105,7 +105,7 @@ class SqlTreeNodeExtraJoin implements SqlTreeNode {
|
||||
|
||||
if (assocBeanProperty instanceof BeanPropertyAssocMany<?>) {
|
||||
BeanPropertyAssocMany<?> manyProp = (BeanPropertyAssocMany<?>) assocBeanProperty;
|
||||
if (manyProp.isManyToMany()) {
|
||||
if (manyProp.hasJoinTable()) {
|
||||
|
||||
manyToMany = true;
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class SqlTreeNodeManyWhereJoin implements SqlTreeNode {
|
||||
|
||||
} else {
|
||||
BeanPropertyAssocMany<?> manyProp = (BeanPropertyAssocMany<?>) nodeBeanProp;
|
||||
if (!manyProp.isManyToMany()) {
|
||||
if (!manyProp.hasJoinTable()) {
|
||||
manyProp.addJoin(joinType, parentAlias, alias, ctx);
|
||||
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user