mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
Fix for #91 Stateless Update API Change, #90 Removed BeanState.setReference(), #89 Remove support for multiple @Id properties
This commit is contained in:
1 parent
5e2d592c2a
commit
0d1c9e2883
66 files changed
+1045
-1768
No files matched your search
@@ -592,7 +592,7 @@ public class CQuery<T> implements DbReadContext, CancelableQuery {
|
||||
} else {
|
||||
// create a new collection to populate and assign to the bean
|
||||
currentDetailCollection = manyProperty.createEmpty(false);
|
||||
manyPropertyEl.elSetValue(loadedBean, currentDetailCollection, false, false);
|
||||
manyPropertyEl.elSetValue(loadedBean, currentDetailCollection, false);
|
||||
}
|
||||
|
||||
if (filterMany != null) {
|
||||
@@ -600,8 +600,7 @@ public class CQuery<T> implements DbReadContext, CancelableQuery {
|
||||
((BeanCollection<?>) currentDetailCollection).setFilterMany(filterMany);
|
||||
}
|
||||
|
||||
// the manyKey is always null for this case, just using default mapKey on
|
||||
// the property
|
||||
// the manyKey is always null for this case, just using default mapKey on the property
|
||||
currentDetailAdd = manyProperty.getBeanCollectionAdd(currentDetailCollection, null);
|
||||
addToCurrentDetailCollection();
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class SqlTreeNodeBean implements SqlTreeNode {
|
||||
this.idBinder = desc.getIdBinder();
|
||||
|
||||
// the bean has an Id property and we want to use it
|
||||
this.readId = withId && (desc.propertiesId().length > 0);
|
||||
this.readId = withId && (desc.getIdProperty() != null);
|
||||
this.disableLazyLoad = !readId || desc.isSqlSelectBased();
|
||||
|
||||
this.tableJoins = props.getTableJoins();
|
||||
@@ -368,7 +368,7 @@ public class SqlTreeNodeBean implements SqlTreeNode {
|
||||
}
|
||||
|
||||
if (readId) {
|
||||
appendSelect(ctx, false, idBinder.getProperties());
|
||||
appendSelect(ctx, false, idBinder.getBeanProperty());
|
||||
}
|
||||
appendSelect(ctx, subQuery, properties);
|
||||
appendSelectTableJoins(ctx);
|
||||
@@ -408,6 +408,13 @@ public class SqlTreeNodeBean implements SqlTreeNode {
|
||||
}
|
||||
}
|
||||
|
||||
private void appendSelect(DbSqlContext ctx, boolean subQuery, BeanProperty prop) {
|
||||
|
||||
if (prop != null) {
|
||||
prop.appendSelect(ctx, subQuery);
|
||||
}
|
||||
}
|
||||
|
||||
public void appendWhere(DbSqlContext ctx) {
|
||||
|
||||
// Only apply inheritance to root node as any join will alreay have the inheritance join include - see TableJoin
|
||||
|
||||
Reference in new issue
Block a user