Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom fields in media objects should run field hooks #544

Open
eduardoboucas opened this issue Apr 10, 2019 · 0 comments
Open

Custom fields in media objects should run field hooks #544

eduardoboucas opened this issue Apr 10, 2019 · 0 comments

Comments

@eduardoboucas
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant