Re: [Neo] Checking if relationship exists between two nodes

2010-04-26 Thread Craig Taverner
> > Yes, I understood that. But I think you should be explicit about which > relationship types you *expect* to remove. This means that if the node had > relationships of types that you didn't expect those will not be removed and > an exception will be thrown when you commit the transaction. This i

Re: [Neo] Checking if relationship exists between two nodes

2010-04-26 Thread Tobias Ivarsson
On Mon, Apr 26, 2010 at 7:38 AM, Rick Bullotta < rick.bullo...@burningskysoftware.com> wrote: > Hi, Tobias. I was only referring to the case when it was the intent to > delete the node also. In that case, you *have* to delete all the > relationships to the node in order to delete the node. No w

Re: [Neo] Checking if relationship exists between two nodes

2010-04-25 Thread Rick Bullotta
...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Tobias Ivarsson Sent: Sunday, April 25, 2010 5:53 PM To: Neo user discussions Subject: Re: [Neo] Checking if relationship exists between two nodes On Sun, Apr 25, 2010 at 10:42 PM, Mattias Persson wrote: > 2010/4/25, Rick Bullotta : >

Re: [Neo] Checking if relationship exists between two nodes

2010-04-25 Thread Niels Hoogeveen
tobias.ivars...@neotechnology.com > Date: Sun, 25 Apr 2010 23:52:45 +0200 > To: user@lists.neo4j.org > Subject: Re: [Neo] Checking if relationship exists between two nodes > > On Sun, Apr 25, 2010 at 10:42 PM, Mattias Persson > wrote: > > > 2010/4/25, Rick Bullotta : > > >

Re: [Neo] Checking if relationship exists between two nodes

2010-04-25 Thread Tobias Ivarsson
ationshipTypes to delete, so that you don't destroy unexpected structures. SomeUtilityClass.delete( Node node, RelationshipType... expectedTypes ) > > > > > -Original Message- > > From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] > On > &g

Re: [Neo] Checking if relationship exists between two nodes

2010-04-25 Thread Mattias Persson
But it may be time to add it > > > -Original Message- > From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On > Behalf Of Mattias Persson > Sent: Sunday, April 25, 2010 3:52 PM > To: Neo4j user discussions > Subject: [Neo] Checking if relationshi

Re: [Neo] Checking if relationship exists between two nodes

2010-04-25 Thread Rick Bullotta
On Behalf Of Mattias Persson Sent: Sunday, April 25, 2010 3:52 PM To: Neo4j user discussions Subject: [Neo] Checking if relationship exists between two nodes As you all (probably) know the Neo4j API has no method Node#hasRelationshipTo(Node otherNode) and to find out such a thing could potentially

[Neo] Checking if relationship exists between two nodes

2010-04-25 Thread Mattias Persson
As you all (probably) know the Neo4j API has no method Node#hasRelationshipTo(Node otherNode) and to find out such a thing could potentially be slow if both the nodes has many relationships (of the type/direction you want to check). I just created a utility for that which starts to iterate from th