}
} else if (source instanceof GraphObject) {
GraphObject obj = (GraphObject)source;
if (propertyKey != null) {
results = (Result<T>) app.nodeQuery(NodeInterface.class).and(propertyKey, obj.getProperty(propertyKey)).getResult();
} else {
// fetch property key for "id", may be different for AbstractNode and AbstractRelationship!
PropertyKey<String> idProperty = StructrApp.getConfiguration().getPropertyKeyForDatabaseName(obj.getClass(), GraphObject.id.dbName());
return (T) app.get(obj.getProperty(idProperty));
}
} else {