Skip to content

Commit

Permalink
Fix UPDATE SET on embedded maps with subqueries
Browse files Browse the repository at this point in the history
Resolves: #8583
  • Loading branch information
luigidellaquila committed Oct 5, 2018
1 parent 7c2b68b commit 75cab1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ protected void setValue(OResult currentRecord, Object target, Object value, OCom
}

private void doSetValue(OResult currentRecord, Object target, Object value, OCommandContext ctx) {
value = OUpdateItem.convertResultToDocument(value);
if (methodCall != null) {
//do nothing
} else if (suffix != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private static Object convertToType(Object item, OClass linkedClass, OCommandCon
return item;
}

private Object convertResultToDocument(Object value) {
public static Object convertResultToDocument(Object value) {
if (value instanceof OResult) {
return ((OResult) value).toElement();
}
Expand All @@ -210,7 +210,7 @@ private Object convertResultToDocument(Object value) {
return value;
}

private boolean containsOResult(Collection value) {
public static boolean containsOResult(Collection value) {
return value.stream().anyMatch(x -> x instanceof OResult);
}

Expand Down

0 comments on commit 75cab1f

Please sign in to comment.