I want to link the objectId from the users table to a column called userObjectId in table B and enforce a referential integrity constraint on table B?
Thanks
I want to link the objectId from the users table to a column called userObjectId in table B and enforce a referential integrity constraint on table B?
Thanks
Hello,
You can use relation for that, but it depends on what constraints exactly do you need? We do not provide not null
constraints on relation columns as of yet unfortunately.
I want to use the object_id in the user table in another table - I want to make sure that the object_id cannot be deleted in the user table if it used in another table.
Well, you can implement this using beforeDelete event handler - you can imagine it as an analogy to a trigger in classic databases. Inside of the handler you will check whether there is any object referencing the current object which is attempted to be deleted, and if there is - either reject the operation or do some cleanup logic you need.