-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
Currently, it's possible to filter media objects by any property, even by fields that don't exist in the media schema. However, when that is the case, the fields don't go through any field hooks, which has some unwanted side effects. For example, a $regex operator will not be transformed in a case-insensitive regular expression, as you would expect.
I'd really like us to formalise the structure of the media collection at some point, so that people would be able to define their own schemas rather than API allowing any field. Until we get there, perhaps the best option is to process custom fields and infer their type, running any applicable field hooks. This would cover String, Number and Boolean only.
jimlambie