Skip to content

Conversation

@ColtraneNadler
Copy link

Why?

Currently neode generates outdated CYPHER query syntax for unique constraints.
View issue here --> #183

What?

in /src/Schema.js update to correct CONSTRAINT syntax. Replace ON with FOR and ASSERT with REQUIRE

function UniqueConstraintCypher(label, property, mode = 'CREATE') {
    // return `${mode} CONSTRAINT ON (model:${label}) ASSERT model.${property} IS UNIQUE`;
    return `${mode} CONSTRAINT FOR (model:${label}) REQUIRE model.${property} IS UNIQUE`;
}

@ColtraneNadler
Copy link
Author

Bumping this

@joshamaju
Copy link

This hasn't been merged 😱, where do I go from here?

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

Successfully merging this pull request may close these issues.

2 participants