fix ORid SQL component to manage legary parsing
@@ -39,7 +39,7 @@ public class ORid extends SimpleNode {
}
public void toString(Map<Object, Object> params, StringBuilder builder) {
- if (legacy) {
+ if (legacy || (expression == null && cluster != null && position != null)) {
builder.append("#" + cluster.getValue() + ":" + position.getValue());
} else {
builder.append("{\"@rid\":");
@@ -49,7 +49,7 @@ public class ORid extends SimpleNode {
}
public ORecordId toRecordId(OResult target, OCommandContext ctx) {
- if (legacy) {
+ if (legacy || (expression == null && cluster != null && position != null)) {
return new ORecordId(cluster.value.intValue(), position.value.longValue());
} else {
Object result = expression.execute(target, ctx);
@@ -67,7 +67,7 @@ public class ORid extends SimpleNode {
}
public ORecordId toRecordId(OIdentifiable target, OCommandContext ctx) {
- if (legacy) {
+ if (legacy || (expression == null && cluster != null && position != null)) {
return new ORecordId(cluster.value.intValue(), position.value.longValue());
} else {
Object result = expression.execute(target, ctx);
