Skip to content

Commit

Permalink
Fix update of newly created document using variables in a SQL batch s…
Browse files Browse the repository at this point in the history
…cript

Resolves: #9000
  • Loading branch information
luigidellaquila committed Oct 1, 2019
1 parent 704572c commit 7413a31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ private void init() {
}
inited = true;
Object src = ctx.getVariable(variableName);
if (src instanceof OResultSet) {
if(src instanceof OInternalResultSet){
source = ((OInternalResultSet)src).copy();
} else if (src instanceof OResultSet) {
source = (OResultSet) src;
source.reset();
} else if (src instanceof OElement) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,10 @@ public void reset() {
public int size() {
return content.size();
}

public OInternalResultSet copy() {
OInternalResultSet result = new OInternalResultSet();
result.content = this.content;
return result;
}
}

0 comments on commit 7413a31

Please sign in to comment.