[Neo] bug in Node.delete() ?

Stefan Armbruster ml001 at armbruster-it.de
Wed Feb 10 10:41:44 CET 2010


thanks for spreading some light on this Ryan and Mattias.

Isn't this a problem when doing unit tests? In order to prevent
persitent modifications in the database I'm wrapping each test in a
seperate transaction that terminates with tx.failure(). In this case,
the unit test runs fine since node.delete() does nothing. When running
the same code in the "wild life", the code throws an exception since
node still is connected to other nodes. This is a little bit weird IMHO.

I'd suggest to introduce a 'forceDelete()' or 'delete(booolean force)'
method that really deletes all relationsships of the node and the node


Mattias Persson schrieb:
> Yep, that's right... The documentation is a bit unclear/untrue about
> that. Ryan is right in that it's only checked when the transaction is
> commited. This means that you can delete a node which has
> relationships on it, just as long as you delete its relationships
> before the transaction is committed.
> 2010/2/9, Ryan Levering <rrlevering at gmail.com>:

More information about the User mailing list