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

Neography::Node.load(existing_node) Not Work in 1.1.0 #101

Closed
bao1018 opened this issue Jul 18, 2013 · 2 comments
Closed

Neography::Node.load(existing_node) Not Work in 1.1.0 #101

bao1018 opened this issue Jul 18, 2013 · 2 comments

Comments

@bao1018
Copy link

bao1018 commented Jul 18, 2013

I found the Neography::Node.load doesn't work after upgrade the gem from 1.0.10 to 1.1.0

My code is like below:
node = @@neo.get_node_index('doc_node_hash_index', 'content_hash',17224960494314920)
node = Neography::Node.load(node)
The error I got

can't convert String into Integer

/Users/jbao009/Documents/vendor/ETR2/ruby/1.9.1/gems/neography-1.1.0/lib/neography/property_container.rb:10:in []' /Users/jbao009/Documents/vendor/ETR2/ruby/1.9.1/gems/neography-1.1.0/lib/neography/property_container.rb:10:ininitialize'
/Users/jbao009/Documents/vendor/ETR2/ruby/1.9.1/gems/neography-1.1.0/lib/neography/node.rb:26:in new' /Users/jbao009/Documents/vendor/ETR2/ruby/1.9.1/gems/neography-1.1.0/lib/neography/node.rb:26:inload'

I thinks this might be caused by the IF statement in node.rb line 23
node = db.get_node(node) if (node.to_s.match(/^\d+$/) or node.to_s.split("/").last.match(/^\d+$/))

I don;t think the IF statement will return TRUE, can you provide me a fix for this ? thanks

maxdemarzi added a commit that referenced this issue Jul 18, 2013
@maxdemarzi
Copy link
Owner

Try it with version 1.1.1

@bao1018
Copy link
Author

bao1018 commented Jul 19, 2013

  • Max,

Yes, it works now, you can close this issue

willkessler pushed a commit to willkessler/neography that referenced this issue Apr 21, 2014
Fixes validations for relationships with empty attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants