Hi Tim,

SDN only uses the internal node id's to attach entities to the graph. Since
these entities should be managed by SDN within the context of a Session,
which is relatively short-lived, it isn't a problem. If you delete entities
externally i.e. not via SDN, then please make sure that your sessions
always have fresh data, by reloading entities.

Having said that, the advice still stands that you should never use these
id's say in a third party system, to act as keys that identify the entity.

At the moment, we have no plans to change this strategy- let us know if
this may be a problem for you.

Regards
Luanne



On Thu, Mar 24, 2016 at 3:54 AM, Tim Colson <[email protected]> wrote:

> Thanks so much Luanne for all the info/explanation!
>
> > SDN uses the internal Neo4j node or relationship ID to track domain
> entities. This is the same as <id> in the Neo4j browser.
> > the loading of Jon - the 'id' is indeed the internal node id.
>
> Whoa... wait, I thought programs relying on internal Neo4j
> node/relationship IDs was a Bad Idea, like "Don't cross the streams!
> <https://www.youtube.com/watch?v=jyaLZHiJJnE>" level of bad, yes?
> http://stackoverflow.com/questions/9051442/node-identifiers-in-neo4j ->
> Michael is saying the same here, yes?
>
> > Since this is an internal id, user code should never set it (Entity.java
> in the sdn university example unfortunately has a setter,
> Duly noted and removed in my clone too.
>
> Your examples with @GraphId, internal/natural ID as properties, and
> @NodeEntity truly helped me understand the "automagicness" of the default
> behavior, and a findByContentId() makes a lot of sense now.
>
> That said, having the raw node IDs in the quintessential Spring Data /
> Neo4j example still bothers me.
> Is there a better way, or is this a strategy change b/c of the
> over-the-wire remote DB?
>
> Thanks!
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to