Replies: 1 comment 1 reply
-
ArcadeDB supports only unique constraints (by using a UNIQUE index). This is what comes with the schema. If you need more control over the validation of your graph, you can use the events API. You can subscribe to the Now it would be a Java piece of code to register, but we're working on releasing generic actions (multi-language programming) so this kind of constraint could be written in Javascript or any other language supported by the JVM. The PR for actions is #281. You can monitor the progress. It already supports multiple languages, we're working now on the declaration of functions using SQL. If you can write your validation logic in Java, then you can already do this with Events: https://docs.arcadedb.com/#Java-Events. You could write something like: database.getSchema().getType("InvoiceDetail").getEvents().registerListener((BeforeRecordCreateListener)
record -> record.asVertex().countEdges(DIRECTION.IN, "detail") > 0); |
Beta Was this translation helpful? Give feedback.
-
Hi,
We have develop somekind of ERP with Java and orientdb we think to migrate to arcadedb. We assumed that we will be able, with orientdb (one day or another) to use some kind of constraints like in RDBMS (unique key, LINK mandatory ); for example be able to say you cannot have an InvoiceDetail without InvoiceMaster, so my question is 👍
Can we do this with arcadedb ?
Will arcadedb manage some kind of constraints ? Mainly relational constraints ?
Beta Was this translation helpful? Give feedback.
All reactions