mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1354 - ENH: Add SqlUpdate setNextParameter() ... as alternative for positioned parameters
This commit is contained in:
1 parent
534eb2f0e2
commit
cca837bcfa
4 files changed
+8
-8
No files matched your search
@@ -482,12 +482,12 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty implements STree
|
||||
void bindParentIds(DefaultSqlUpdate delete, List<Object> parentIds) {
|
||||
|
||||
if (isExportedSimple()) {
|
||||
delete.addParameter(new MultiValueWrapper(parentIds));
|
||||
delete.setNextParameter(new MultiValueWrapper(parentIds));
|
||||
} else {
|
||||
// embedded ids etc
|
||||
List<Object> bindValues = flattenParentIds(parentIds);
|
||||
for (Object bindValue : bindValues) {
|
||||
delete.addParameter(bindValue);
|
||||
delete.setNextParameter(bindValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -495,12 +495,12 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty implements STree
|
||||
void bindParentId(DefaultSqlUpdate sqlUpd, Object parentId) {
|
||||
|
||||
if (isExportedSimple()) {
|
||||
sqlUpd.addParameter(parentId);
|
||||
sqlUpd.setNextParameter(parentId);
|
||||
return;
|
||||
}
|
||||
EntityBean parent = (EntityBean) parentId;
|
||||
for (ExportedProperty exportedProperty : exportedProperties) {
|
||||
sqlUpd.addParameter(exportedProperty.getValue(parent));
|
||||
sqlUpd.setNextParameter(exportedProperty.getValue(parent));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user