GithubHelp home page GithubHelp logo

Comments (6)

chrisregnier avatar chrisregnier commented on September 26, 2024 3

Is there anyway to call the uuid generator directly from the CREATE query? Something like
CREATE (n:Testing {name: 'Testing', uuid: ga.uuid.uuidGenerator()}) RETURN n

Also, should there be some docs about this in the README cause it took me a bit to figure out why this wasn't working or what to even search for?

from neo4j-uuid.

foobargeez avatar foobargeez commented on September 26, 2024

Is #3 still applicable? If so, this can be closed.

from neo4j-uuid.

ikwattro avatar ikwattro commented on September 26, 2024

Hi @foobargeez

Yes #3 is still of application, unfortunately :(

if the second cypher query is internal to your application, you can just return the internal id of the node :

CREATE (n:Testing {name:"haha"}) RETURN id(n)
---
// Later
MATCH (n) WHERE id(n) = 123 RETURN n.uuid

There is no current workaround to it apart from using your own uuid generation library, this is also a known limitation for current object graph mappers like the java-ogm or php-ogm in order to use this plugin as Id Strategy. While using a uuid generator yourself is not so much of a hassle generally.

from neo4j-uuid.

Joshfindit avatar Joshfindit commented on September 26, 2024

Just thinking out loud; since we're talking about create, can you create while specifying a uuid that you generated?

On Aug 2, 2016, at 11:58 AM, foobargeez [email protected] wrote:

Currently, doing something like this CREATE (n:testing {name:"haha"}) RETURN n.uuid return null. Querying for the above node again immediately results a UUID. The module is probably behaving per design but I am stuck with a basic requirement -- how do I uniquely query for the newly created node as part of the second query if I don't have the UUID? I could be missing something fairly obvious and I would appreciate if someone can point me how to achieve this -- create a node and retrieve the UUID in the same call/transaction (I could be using the word transaction somewhat loosely).

Thanks in advance!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

from neo4j-uuid.

foobargeez avatar foobargeez commented on September 26, 2024

Thanks. I almost forgot neo4j's native id -- thanks for the tip.

I currently create a UUID (v3) and assign to the node property while creating a node. I was asking as it's just redundant (from both efficiency and storage perspective) when I already have your UUID module and is working well (except this one glitch), so wanted to check.

from neo4j-uuid.

ikwattro avatar ikwattro commented on September 26, 2024

@Joshfindit what do you mean exactly ?

@foobargeez yeah it doesn't make sense to have both an application side uuid generation together with this uuid module.

from neo4j-uuid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.