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
You can currently add a foreign key (fk) to a schema, it would be nice to filter that fk on a field that is present as another key in the fk's schema.
i.e. Schema two can only access schema ones data on condition of filter
`
const schemaOne = Joi.object({
schemaOneId: joi.string().pk().required(),
schemaOneCategory: Joi.string(),
isActive: Joi.boolen().meta({}),
};
You can currently add a foreign key (fk) to a schema, it would be nice to filter that fk on a field that is present as another key in the fk's schema.
i.e. Schema two can only access schema ones data on condition of filter
`
const schemaOne = Joi.object({
schemaOneId: joi.string().pk().required(),
schemaOneCategory: Joi.string(),
isActive: Joi.boolen().meta({}),
};
const schemaTwo = Joi.object({
schemaTwoId: joi.string().pk().required(),
schemaOneItem: Joi.string().fk('schemaOne.[].schemaOneId').meta({{ isActive: { isActive: true } }}),
}
const schema = Joi.object({
schemaOne: Joi.array().items(schemaOne).optional().uniqueOnPks(),
schemaTwo: Joi.array().items(schemaTwo).optional().uniqueOnPks(),
}
`
The text was updated successfully, but these errors were encountered: