[Neo] [Neo tickets] #93: IMDB application 1.1

Anders Nawroth anders at neotechnology.com
Thu Jan 29 13:32:55 CET 2009


hi!

Tobias Ivarsson wrote:
> I would like raise the questions in this ticket comment to the mailing list.
>   

Thanks for doing so!

>>  I know that there's delete() on both nodes and relationships but I can't
>>  figure out whether I need to call both or calling delete() on node will
>>  handle the deletion of its relationships as well.  I can still retrieve
>>  either node or relationship by their ID even after calling their delete
>>  methods!
>>     
>
>
> Before the transaction where the node/relationship was removed is committed
> it is very possible to retrieve them. And it should be, they are still alive
> in other threads.
>   

Maybe it's a bit more complicated. From the Node.delete() JavaDocs:
> Deletes this node. Invoking any methods on this node after |delete()| 
> has returned is invalid and will lead to unspecified behavior. 

I think invoking methods on the node in other threads should be fine, as 
long as the change wasn't committed. (same goes for relationships)

> It is important to notice that a node that has relationships cannot be
> removed, so the relationships need to be removed first.
>   

Then this should be added to the JavaDocs, I can't find it there.

>>  There should be a mention of what happens to island graphs, are they lost
>>  in Neo forever?
>>     
>
>
> You can still access these by ID. So if they have references stored in an
> index they are very much accessible, this is also a very common case.
>   

I'll add this to the IMDB exemple, and will look for where to add it in 
other documentation as well.


/anders



More information about the User mailing list