Fair enough- since the sample application supports deleting entities, the problem may arise, even with short lived sessions.
We'll update SDN4-University for this. Regards Luanne On Fri, Mar 25, 2016 at 11:33 PM, Tim Colson <timcol...@gmail.com> wrote: > SDN only uses the internal node id's to attach entities to the graph. > > 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. > > > Let me play this back... > 1) SDN4-university <https://github.com/neo4j-examples/sdn4-university> is > the primary learning example - yes? > 2) SDN Entity & Controller objects use graph node ID exclusively (code > below) - yes? > 3) Graph node IDs "should never be used" - correct? > > Therefore the example is saying, "*Here is how to do this...but never do > it this way." *? > (Actually, the readme doesn't actually give fair warning to not do it this > way.) > > The example gives people the impression that using Node IDs is the correct > way to go. > Wouldn't it be better to update SDN to *not *use the graph Node IDs and > set a good example to base real world solutions upon? > > -Tim > > > P.S. Example: All *Controllers* use the Long id for entities, which are > the graph node ID, which should never be used. > > @RequestMapping(value = "/{id}", method = RequestMethod.GET) > public T find(@PathVariable Long id, final HttpServletResponse response) { > setHeaders(response); > return find(id); > } > > public T find(Long id) { > T entity = getService().find(id); > if (entity != null) { > System.out.println("from OGM: " + entity); > return entity; > } > throw new NotFoundException(); > } > > @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) > public void delete(@PathVariable Long id, final HttpServletResponse > response) { > setHeaders(response); > delete(id); > } > > @RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = > "application/json") > public T update(@PathVariable Long id, @RequestBody T entity, final > HttpServletResponse > response) { > setHeaders(response); > return update(id, entity); > } > > > > -- > 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 neo4j+unsubscr...@googlegroups.com. > 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 neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.