Neo4j does not allow relationships where the start node and end node are the
same.

It looks like the batch inserter does not verify this constraint which is
why you run into trouble when traversing the graph instead.

Cheers,
Tobias

On Wed, Dec 30, 2009 at 11:17 AM, Núria Trench <[email protected]>wrote:

> Hi,
>
> I have created a network with the Batch Inserter component which has
> relationships from a node to itself. So, I am unable to traverse this
> network because it throws an exception when the traverser finds a
> relationship that its tail and head node are equals. The exception is the
> following one:
>
> Exception in thread "main" java.lang.IllegalArgumentException: Start node
> equals end node
>        at
> org.neo4j.impl.core.RelationshipImpl.<init>(RelationshipImpl.java:58)
>        at
> org.neo4j.impl.core.NodeManager.getMoreRelationships(NodeManager.java:604)
>        at
> org.neo4j.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:332)
>        at
> org.neo4j.impl.core.NodeImpl.ensureFullRelationships(NodeImpl.java:320)
>        at
> org.neo4j.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:129)
>        at org.neo4j.impl.core.NodeImpl.getRelationships(NodeImpl.java:199)
>        at org.neo4j.impl.core.NodeProxy.getRelationships(NodeProxy.java:87)
>        at
>
> org.neo4j.impl.traversal.AbstractTraverser.addEndNodesToList(AbstractTraverser.java:256)
>        at
>
> org.neo4j.impl.traversal.AbstractTraverser.traverseToNextNode(AbstractTraverser.java:201)
>        at
>
> org.neo4j.impl.traversal.AbstractTraverser.hasNext(AbstractTraverser.java:134)
>
> How can I traverse this network without getting an exception? I can't
> change
> the schema.
> Thank your very much in advance,
>
> Núria.
> _______________________________________________
> Neo mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Tobias Ivarsson <[email protected]>
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to