You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no (simple) way to ensure that the works.owner value exists in the people collection. Currently, one must implement a custom Validator class in order to enforce basic RI rules.
A simplistic approach would allow schema-based specification of the referenced collection name, and if the value doesn't exist, raise an exception.
A more flexible approach would allow optional specification of a callable validation method, thus providing more sophisticated business rules. A default behavior would be to verify existence in the referenced collection per the 'simplistic' approach.
The text was updated successfully, but these errors were encountered:
This raises a related feature: Support for a list of objectid types validated against some collection (all objectid items in the list must exist in some collection.
Should this require writing a custom Validator? (Using a custom Validator may be the correct solution, but I don't know enough to decide.)
This case could be handled in the application using a callable validation function if that capability exists.
At the cost of a little complexity The data_relation keyword would allow to specify both the parent collection and the linked field, allowing for some flexibility (you can reference non-primary key fields).
"Would be helpful" if the schema supported referential integrity validation for
objectid
types duringPOST
/PATCH
ops.For example, in eve-demo:
There is no (simple) way to ensure that the
works.owner
value exists in thepeople
collection. Currently, one must implement a customValidator
class in order to enforce basic RI rules.A simplistic approach would allow schema-based specification of the referenced collection name, and if the value doesn't exist, raise an exception.
A more flexible approach would allow optional specification of a callable validation method, thus providing more sophisticated business rules. A default behavior would be to verify existence in the referenced collection per the 'simplistic' approach.
The text was updated successfully, but these errors were encountered: