Fix breadth-first traverse
@@ -53,6 +53,7 @@ public class BreadthFirstTraverseStep extends AbstractTraverseStep {
res = new OTraverseResult();
res.setElement(item.getElement().get());
res.depth = 0;
+ res.setMetadata("$depth", 0);
} else if (item.getPropertyNames().size() == 1) {
Object val = item.getProperty(item.getPropertyNames().iterator().next());
if (val instanceof OIdentifiable) {
