moved check for __prototype__ up before db lookup in getProperty
This commit is contained in:
parent
7dbabcb18c
commit
7ee7c194a8
1 changed files with 3 additions and 3 deletions
|
@ -399,9 +399,11 @@ public class ESNode extends ObjectPrototype {
|
|||
return rel == null ? (ESValue) ESNull.theNull : new ESString (rel);
|
||||
}
|
||||
|
||||
// this is not very nice, but as a hack we expose the id of a node as node.__id__
|
||||
// this is not very nice, but as a hack we return the id of a node as node.__id__
|
||||
if ("__id__".equals (propertyName))
|
||||
return new ESString (node.getID ());
|
||||
if ("__prototype__".equals (propertyName))
|
||||
return new ESString (node.getPrototype ());
|
||||
|
||||
// this _may_ do a relational query if properties are mapped to a relational type.
|
||||
IProperty p = (IProperty) node.get (propertyName, false);
|
||||
|
@ -446,8 +448,6 @@ public class ESNode extends ObjectPrototype {
|
|||
return new ESString (node.getFullName ());
|
||||
if ("__hash__".equals (propertyName))
|
||||
return new ESString (""+node.hashCode ());
|
||||
if ("__prototype__".equals (propertyName))
|
||||
return new ESString (node.getPrototype ());
|
||||
if ("__node__".equals (propertyName))
|
||||
return ESLoader.normalizeObject (node, evaluator);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue