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

Load virtual into schema struct #4586

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jswanner
Copy link

@jswanner jswanner commented Mar 1, 2025

@josevalim
Copy link
Member

It looks good to me, although I am a bit worried about loading virtual fields. Do you have thoughts @greg-rychlewski? Worst case scenario we require it to be opt-in via a flag.

@greg-rychlewski
Copy link
Member

I think it would have to be opt-in because the function is shared by embedded loading. So if it wasn't opt-in virtual embed fields would start appearing in results.

Using the schema as the type definition feels a bit off to me if wanting to load virtual fields. They are ignored in all the other Schema API functions, as far as I can see.

Maybe it would make sense to expand the reflection api so the user can create their own type map?

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

Successfully merging this pull request may close these issues.

3 participants