Hello,
I have a transaction where I want to refer to a let binding in an increment statement.
I am using OrientDB 2.0.8.
This is a simplified version of the query that I want to execute, but it results in a OCommandExecutionException:
BEGIN
LET destPositionCount = SELECT count(*) FROM containsContainer WHERE (out.@rid = :parentId AND position = :destPosition)
LET updateContainerPositions = UPDATE containsContainer INCREMENT position = $destPositionCount WHERE position >= :lowerBound
COMMIT
RETURN $updateContainerPositions
The interesting part is "INCREMENT position = $destPositionCount". This is the reason it fails.
I also tried casting $destPositionCount to an int using "$destPositionCount.asInteger()", but it didn't help.
Is there something I am doing wrong or is this a limitation with OrientDB. Do you have any suggestions how I could solve this?
Best regards,
Jonathan