Should Neo4j::Rails::Relationship#other_node returns a wrapper node? #226

Closed
tomchentw opened this Issue Dec 8, 2012 · 1 comment

Projects

None yet

2 participants

@tomchentw

I've used neo4j.rb quite happy. Thanks for your guys work!!

However, when I tried to use Neo4j::Rails::Relationship#other_node(node)

to get the other node referenced by this relation, I found it returns a

Java::OrgNeo4jKernelImplCore::NodeProxy

object, which is what I don't want.

After digging into source code:

https://github.com/andreasronge/neo4j/blob/master/lib/neo4j/rails/relationship_persistence.rb

I found that #start_node and #end_node both returns wrapper object through node.wrapper.

My question is, why doesn't other_node behaves like this?

Is there any concern that I might not notice?

Thank you!!

@andreasronge
Member

Not sure why it look like that. You could try to fix it and make it behave
like the other methods. See if the RSpecs still works.
Pull requests are welcome :-)

On Sat, Dec 8, 2012 at 7:17 PM, Tom Chen notifications@github.com wrote:

I've used neo4j.rb quite happy. Thanks for your guys work!!

However, when I tried to use Neo4j::Rails::Relationship#other_node(node)

to get the other node referenced by this relation, I found it returns a

Java::OrgNeo4jKernelImplCore::NodeProxy

object, which is what I don't want.

After digging into source code:

https://github.com/andreasronge/neo4j/blob/master/lib/neo4j/rails/relationship_persistence.rb

I found that #start_node and #end_node both returns wrapper object through
node.wrapper.

My question is, why doesn't other_node behaves like this?

Is there any concern that I might not notice?

Thank you!!


Reply to this email directly or view it on GitHubhttps://github.com/andreasronge/neo4j/issues/226.

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