[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Discussion : Do we want to add Property type constraints ? #751

Open
mariusconjeaud opened this issue Sep 25, 2023 · 1 comment
Open

Discussion : Do we want to add Property type constraints ? #751

mariusconjeaud opened this issue Sep 25, 2023 · 1 comment

Comments

@mariusconjeaud
Copy link
Collaborator
mariusconjeaud commented Sep 25, 2023

Neo4j (Enterprise Edition) 5.9 introduced property type constraints.

The question is the following : do we want to add support for this in neomodel ?

Since neomodel defines property types in the Node and Relationship classes, we technically already provide property type constraints on top of Neo4j, but only when you go through neomodel.
So I see a use case where other apps also connect to the Neo4j database (or scripts, ETL, ...), without using the models defined in neomodel => then you cannot control property type. But I am unsure if in those use cases, you would want to give to neomodel the responsibility of creating such constraints on the Neo4j database ?

Happy for feedback here !

Note : this is an Enterprise Edition feature only, but we recently made neomodel Neo4j edition- and version-aware, so we could control creation of said constraints only to those apps running against an EE 5.9+ database

@aanastasiou
Copy link
Collaborator

Hi, for what it is worth:

This is a great feature in general, but also for neomodel since it is always possible that the database data are modified by another actor.

It is very useful that certain constraints are label dependent, which implies a straightforward mapping to classes and their attributes, since neomodel uses a node's labels to instantiate the right type of object.

Since we have neomodel_install_labels we could enable it as a switch there, so that the constraints are created on the first run but optionally and with a possible caveat that this kind of feature is more valuable the closer a data product is to production.

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

No branches or pull requests

2 participants