andreasronge/neo4j — Issue #156: Redundantly setting both halves of a has_one rel causes issues
Author: pehrlich
Created: 2012-02-11 22:52:25+00:00
State: open

More good news, andreas

If two posts are related:

has_one(:older_post).to(Post)
has_one(:newer_post).from(Post, :older_post)

And both set:

p1.older_post = p2
p2.older_post = p1

and saved:

p1.save
p2.save

Two rels are created:

> p1.better_post
NativeException: org.neo4j.graphdb.NotFoundException: More than one relationship[DynamicRelationshipType[Post#worse_post], INCOMING] found for NodeImpl#23