Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you give an example of create #4

Open
rajeshkmindix opened this issue Nov 20, 2017 · 1 comment
Open

Could you give an example of create #4

rajeshkmindix opened this issue Nov 20, 2017 · 1 comment

Comments

@rajeshkmindix
Copy link

Could you give an example of how to run a create?

The following gives me an error
`val query = cypher"create (b:Node {id: 1, name: "Name1"}) return b"

val request = sessionFuture.flatMap(session => session(query))

Await.result(request, Duration.Inf)`

The error
Parameter provided for node creation is not a Map
...
org.neo4j.cypher.internal.frontend.v3_3.CypherTypeException: Parameter provided for node creation is not a Map\n\tat org.neo4j.cypher.internal.compatibility.v3_3.runtime.pipes.BaseCreateNodePipe$$anonfun$setProperties$1.apply(CreateNodePipe.scala:60)

@darkfrog26
Copy link
Contributor

try something like this instead:

        val id = 1
        val name = "Name1"
        val query = cypher"""
          CREATE (b: Node)
          SET b.id = $id
          SET b.name = $name
          RETURN b
        """

However, I must warn you that I've abandoned this project in favor of using ArangoDB and my own driver (https://github.com/outr/scarango). There are significant advantages over Neo4j with ArangoDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants