Permalink
Browse files

~ update to make it work on the current neo4j 1.1-SNAPSHOT

  • Loading branch information...
1 parent 788fd18 commit 668dde940d8f34b11aa819b3dd9cb4e61b74979c @neumann committed Jul 20, 2010
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/p_graph_service/core/PGraphDatabaseServiceImpl.java
@@ -19,6 +19,8 @@
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.event.KernelEventHandler;
import org.neo4j.graphdb.event.TransactionEventHandler;
+//import org.neo4j.graphdb.event.KernelEventHandler;
+//import org.neo4j.graphdb.event.TransactionEventHandler;
import org.neo4j.kernel.impl.nioneo.store.IdGenerator;
import org.neo4j.kernel.impl.nioneo.store.IdGeneratorImpl;
@@ -423,6 +425,7 @@ else if (!sNode.hasProperty(PConst.IsGhost)) {
for (Relationship rs : curN.getRelationships(Direction.OUTGOING)) {
Node eNode = rs.getEndNode();
+ long rsGID = (Long)rs.getProperty(PConst.rGID);
long[] newRsPos;
if (rs.hasProperty(PConst.IsHalf)) {
@@ -567,7 +570,7 @@ else if (gRelPos[1] == instanceID) {
}
// update lookup
- INDEX.addRela((Long) rs.getProperty(PConst.rGID), newRsPos);
+ INDEX.addRela(rsGID, newRsPos);
INST.get(newRsPos[1]).logAddRela();
INST.get(curPos[1]).logAddRela();
@@ -793,7 +796,7 @@ public void remove() {
public Node createNodeOn(long gid, long instanceID) {
if (PTX == null)
throw new NotInTransactionException();
- if(INDEX.findNode(gid)!=null) new Error("dublicated Node ID found: "+gid);
+ //if(INDEX.findNode(gid)!=null) new Error("dublicated Node ID found: "+gid);
DBInstanceContainer inst = INST.get(instanceID);
// create transaction if not existing
PTX.registerResource(instanceID);
@@ -854,7 +857,7 @@ public KernelEventHandler unregisterKernelEventHandler(
throw new UnsupportedOperationException(
"Node.getGraphDatabase() not implemented");
}
-
+
@Override
public InstanceInfo getInstanceInfoFor(long id) {
return INST.get(id).getInfo();
@@ -876,6 +879,7 @@ public String getDBChangeLog() {
throw new UnsupportedOperationException(
"Node.getGraphDatabase() not implemented");
}
+

0 comments on commit 668dde9

Please sign in to comment.