RE: removal semantic

12 views
Skip to first unread message

Pieter Martin

unread,
Jun 16, 2011, 6:55:00 AM6/16/11
to orientdb
Hi,

We are using the tinkerpop blueprints api.

I am running our test cases against Neo4J now and have come across the
following difference.

The following test passes in OrientDb but fails in Neo4J with a

@Test
public void testVertexRemoval() {
Vertex one = db.addVertex(null);
one.setProperty("testProperty", "dribble");
db.removeVertex(one);
Assert.assertEquals("dribble", one.getProperty("testProperty"));
}


org.neo4j.graphdb.NotFoundException: Node[1] not found.
at
org.neo4j.kernel.impl.core.NodeManager.getNodeForProxy(NodeManager.java:447)
at org.neo4j.kernel.impl.core.NodeProxy.hasProperty(NodeProxy.java:139)
at
com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jElement.getProperty(Neo4jElement.java:29)

This showed up bugs in our code as we were accessing vertexes that had
previously removed.

Is this expected behavior in OrientDb?

Thanks
Pieter

Luca Garulli

unread,
Jun 16, 2011, 7:02:42 AM6/16/11
to orient-...@googlegroups.com
Hi Pieter,
the node continue to live in memory until is out of scope (end of the method). Neo4J stores the element in a totally different way, so probably it needs the graph element exists to retrieve a property with getProperty(). Probably this is out of scope of current TinkerPop Blueprints "specification".

Marko what do you think?

Lvc@

Pieter Martin

unread,
Jun 16, 2011, 7:10:19 AM6/16/11
to orient-...@googlegroups.com
Ok, thanks.
Reply all
Reply to author
Forward
0 new messages