cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

Create node and editing features

jimbobbannister
Node Link

Hi, I am attempting to "Create Node" from the Bloom context menu, but this is not possible if there is/are constraints in place - for example I get the message "Creating a node with this label is not possible because of existence constraints. This property is mandatory: text"

Is there a way around this so I can Create Nodes in Bloom? Obviously I prefer not to drop the constraints.

*** There doesn't appear to be function to permanently delete relationships or nodes, is that correct? It's not possible to create via search query i.e. MATCH (: {name: "xxx"})-[r:STATEMENT]-(:Statement {text: "blah blah"})
DELETE r
This adds a LIMIT to the end of the statement during processing, and that causes an error.

I was wondering if there are any new releases in the pipeline that include improvements to creating and editing nodes and relationships?

Thanks

5 REPLIES 5

yyyguy
Graph Buddy

On your question about deleting relationships or nodes, here are examples of how you can do this using your example.

Deleting a node (Note: DETACH DELETE is required if there are relationships with the node(s))

MATCH (n:Name {name: "xxx"})-[r:HAS_STATEMENT]->(s:Statement {text: "blah blah"})
DETACH DELETE n

Deleting a relationship

MATCH (n:Name {name: "xxx"})-[r:HAS_STATEMENT]->(s:Statement {text: "blah blah"})
DELETE r

jimbobbannister
Node Link

Thanks for your reply. I am attempting to create a Search Phrase in Bloom which uses a Cypher statement to DELETE a relationship. The statement runs ok via the Neo4j Browser. It does not run in Bloom because Bloom appears to add a LIMIT clause to the end of the statement before it is processed.
i.e. AN ERROR OCCURRED WHILE EXECUTING SEARCH
Invalid input 'I': expected 'o/O' (line 2, column 11 (offset: 154))
"DELETE r LIMIT 100"

The LIMIT 100 is added by Bloom to my statement.

anurag_tandon
Node Clone

Hello, Bloom does put limits on the results of a search phrase to ensure that performance of these phrases is manageable. In the case of your query, you are encountering a bug in how LIMIT is applied to the query and we plan to fix it in an upcoming release.

We haven't prioritized the Delete operation in Bloom so far, but expect to have it in our roadmap for next year when we are able to prioritize editing related enhancements, which should also include better handling of database constraints.

With regards to creating nodes when you have existence constraints, can you try to Duplicate an existing node and change its properties, instead of creating a node, just as a workaround? This may not work if you also have uniqueness constraints in your data.

Thanks for your reply.

Do you have a release date for a fix to the bug in how LIMIT is applied, please?

I have tried to Duplicate as you have suggested, but get the message "Duplicating this node is not possible because of uniqueness constraints. A node already exists with name 'xxxx'", and can't duplicate the node as you believed (because of the uniqueness constraints in our data).

I do not, at this time. But, we have included this issue for our first half of 2020 backlog.