I am coming from the RDBMS world. so forgive if I ask a badly phrased question.
I have a situation where I need to ensure unique or partial unique populating data inside cayley
In RDBMS such as postgres, I can build a table like this:
- primary autoincrement key called id
- foreignkey to person table called person_id
- foreignkey to product table called product_id
- foreignkey to price table called price_id
- boolean field called is_removed
If i want a unique constraint such as the entire table can have a unique index such that product_id and price_id are together as a pair must be unique, I can do that.
if i want a partial unique constraint in postgres where if the is_removed is False, then the person_id, product_id, and price_id are unique.
Then if the foreignkeys are null, the constraints are not triggered.
How do I have something this inside cayley?