[Neo4j] Need Node.isDeleted() again ...
mattias at neotechnology.com
Wed Dec 15 15:43:27 CET 2010
2010/12/14 Andreas Ronge <andreas.ronge at gmail.com>
> I'm still struggling with not having a Node.isDeleted() method in the API.
> Here is an example where I need this method:
> I'm using the event framework to implemented a simple rule system.
> When a node/relationship changes it can trigger an action like setting
> a property on another node.
> That node must not have been deleted (in the same transaction).
> The only way to detect if a node has been deleted is to loop through
> the org.neo4j.graphdb.event.TransactionData#deletedNodes()
> which feel clumsy. Another solution might be to change the Event API
> to make this easier (and faster ?) to do ?
Yes, maybe the data in TransactionData could be a little better, f.ex.
exposing a method #nodeIsDeleted(Node) and many more of those?
> I mostly need the isDeleted() method in my unit tests where I want to
> delete every node after a test, or test if a node exist or not.
> Neo4j mailing list
> User at lists.neo4j.org
Mattias Persson, [mattias at neotechnology.com]
Hacker, Neo Technology
More information about the User