hi!

Johan Svensson wrote:
On Wed, Jul 2, 2008 at 4:48 PM, Peter Haensgen <[EMAIL PROTECTED]> wrote:
Hi,

Are there any reasons for comparing nodes by their id and not use
equals()?

The proxy class that implements the Node interface therefore should
override the equals() method and compare the ids instead. I don't know
if that has been done, but I would think so.


Yes. All implementations of Node or Relationship interfaces have
equals overridden. So always compare using id or equals method. Never
use object reference compare since they may be different (this is true
for relationship types too).


OK, I think this may be more of a documentation issue.

If all implementations do override equals() this maybe should be added to and documented in the interface API to get some natural place to put this information.

Or could there be a reason for an implementation not to implement/override equals()? In that case, this really needs to be documented somewhere ...

/anders

_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to