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
Instead of tagging them with metadata it would be better if we could make them multimethods that dispatch off of the model as well as the key they are hydrating. That way different methods could be used to hydrate the same key for instances of different models. The approach also seems a little cleaner than having hydrate look through all namespaces for functions with matching metadata
There are two things that might make this tricky:
The difference between single hydration and batched hydration functions would have to be addressed somehow (perhaps with two multimethods?)
This change would require reworking things a bit for people using the library
The text was updated successfully, but these errors were encountered:
I'm actually of the opinion that everything (including things like pre-insert!) should be implemented with multimethods instead of protocols. That would be a big breaking change, however.
Instead of tagging them with metadata it would be better if we could make them multimethods that dispatch off of the model as well as the key they are hydrating. That way different methods could be used to hydrate the same key for instances of different models. The approach also seems a little cleaner than having hydrate look through all namespaces for functions with matching metadata
There are two things that might make this tricky:
The text was updated successfully, but these errors were encountered: