Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_relationship causes batch to fail (returns nil) #40

Open
beverlycodes opened this issue Apr 24, 2012 · 2 comments
Open

create_relationship causes batch to fail (returns nil) #40

beverlycodes opened this issue Apr 24, 2012 · 2 comments

Comments

@beverlycodes
Copy link

I'm unable to create relationships in a batch. The moment I add a :create_relationship call to a batch, @neo.batch returns nil and nothing is created in my graph.

The following fails:

[:create_unique_node, "person", "ssn", "000-00-0001", {:first_name=>"Jane", :last_name=>"Doe", :ssn=>"000-00-0001", :_type=>"Person", :created_at=>1335269478}],
[:add_node_to_index, "person_ssn", "ssn", "000-00-0001", "{0}"],
[:create_node, {:street1=>"94437 Kemmer Crossing", :street2=>"Apt. 333", :city=>"Abshireton", :state=>"AA", :zip=>"65820", :_type=>"Address", :created_at=>1335269478}],
[:create_relationship, "has", "{0}", "{2}", {}]

However, the nodes get created (without the relationship) if I just run:

[:create_unique_node, "person", "ssn", "000-00-0001", {:first_name=>"Jane", :last_name=>"Doe", :ssn=>"000-00-0001", :_type=>"Person", :created_at=>1335269478}],
[:add_node_to_index, "person_ssn", "ssn", "000-00-0001", "{0}"],
[:create_node, {:street1=>"94437 Kemmer Crossing", :street2=>"Apt. 333", :city=>"Abshireton", :state=>"AA", :zip=>"65820", :_type=>"Address", :created_at=>1335269478}]

I've tried [:create_relationship, "has", "{0}", "{2}"] instead with the same failing result. Since there is no error raised when my batch fails, I've been unable to track down exactly what is going wrong.

@maxdemarzi
Copy link
Owner

This may be a Neo4j problem.

I tried it both ways on version 1.7 (create unique node first, or create regular node first) all fails.
Tried it on 1.8, creating a regular node first works, but then the relationship is pointing the wrong way. If I try reversing the numbers {2} {0} I get an error.

I think => https://github.com/neo4j/community/issues/302 is part of the problem.

@maxdemarzi
Copy link
Owner

I went ahead and opened a new ticket. https://github.com/neo4j/community/issues/465
It seems to work the first time, and fail everytime afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants