[Neo4j] getProperty() on deleted Node in TransactionEventHandler.beforeCommit()

2011-09-08 Thread tcolar
We have an implementation of TransactionEventHandlerNeo4JTransaction

in the method beforeCommit() I would like to use getProperty(nodeType) ..
so I can take proper action.
Now in the case of a deletion event, it won't let me call it and throws an
exception.

I'm surprised by this exception has this is beforeCommit() and the node is
not delete YET.

public Neo4JTransaction beforeCommit(TransactionData data) throws Exception
{
for (Node deletedNode : data.deletedNodes()) {
boolean b = deletedNode.hasproperty(type) // Fails with 
Exception
}
}

Caused by: java.lang.IllegalStateException: Node[9] has been deleted in this
tx
at
org.neo4j.kernel.impl.core.LockReleaser.getCowPropertyRemoveMap(LockReleaser.java:450)
at
org.neo4j.kernel.impl.core.NodeManager.getCowPropertyRemoveMap(NodeManager.java:991)
at org.neo4j.kernel.impl.core.Primitive.hasProperty(Primitive.java:278)
at org.neo4j.kernel.impl.core.NodeProxy.hasProperty(NodeProxy.java:150)

Is this expected / a bug ?

Any alternatives ?

Thanks.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/getProperty-on-deleted-Node-in-TransactionEventHandler-beforeCommit-tp3320791p3320791.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] getProperty() on deleted Node in TransactionEventHandler.beforeCommit()

2011-09-08 Thread tcolar
To reply to myself:

I found out that i was able to get the properties of the to be deleted node
in data.removedNodeProperties()
with the value being in previouslyCommitedValue()

 

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/getProperty-on-deleted-Node-in-TransactionEventHandler-beforeCommit-tp3320791p3321945.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user