Results 1 to 2 of 2

Thread: How to get UUID's from Spring data neo4j?

Threaded View

  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Default How to get UUID's from Spring data neo4j?

    I need to get a UUID wich is valid across multiple vm's so my only conclusion was to retrieve a UUID from the neo4j db (or store and handle it there).

    Is there an implementation I can rely on or do I have to implement this myself?

    I did a research on this and only found low level neo4j hints, which stated I need a lock on a node, then get the id, increment it and write it back. But I am having trouble implementing this.

    Any code snippets on how to do this would be greatly appreciated.

    EDIT: I wrote a small hack and created a node that only has a unique id and a method that write locks this node and then increases that id. But a native, thread safe method would be way cooler.
    Last edited by chris_ds; Jul 17th, 2012 at 07:47 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •