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
Suppose you have a media field that could be of type "image", or "video", or even "html", each of this type can have different field names, types and validations. It would be nice to have a single media entry with different schemas enabled depending on the "type" discriminant.
e.g:
I see two use cases:
Polymorphic joins
You may want fields in your resources where you could embed different types of resources ordered.
e.g:
Article data in the DB would look like
And with links joined on fetch
Polymorphic document parts
Suppose you have a media field that could be of type "image", or "video", or even "html", each of this type can have different field names, types and validations. It would be nice to have a single
media
entry with different schemas enabled depending on the "type" discriminant.e.g:
The text was updated successfully, but these errors were encountered: