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
This could be useful in cases where we entities that can provide substantially the same view type spread across two different models. Consider the new content system: we have both Sentence and LocalSentence, and both Word and LocalWord. Both the global and local forms have translations etc, but unless we want to deal with polymorphic associations they need to be in separate tables. It might be nice for the views to abstract over this structural difference that's only necessary for storage.
In principle we could specify the possible models for the viewmodel as a hash from parent view to model class - something like { WordView => WordTranslation, LocalWordView => LocalWordTranslation }.
We could then use deserialization parent context to select the appropriate model to deserialize a new instance into.
The text was updated successfully, but these errors were encountered:
This could be useful in cases where we entities that can provide substantially the same view type spread across two different models. Consider the new content system: we have both
Sentence
andLocalSentence
, and bothWord
andLocalWord
. Both the global and local forms have translations etc, but unless we want to deal with polymorphic associations they need to be in separate tables. It might be nice for the views to abstract over this structural difference that's only necessary for storage.In principle we could specify the possible models for the viewmodel as a hash from parent view to model class - something like
{ WordView => WordTranslation, LocalWordView => LocalWordTranslation }
.We could then use deserialization parent context to select the appropriate model to deserialize a new instance into.
The text was updated successfully, but these errors were encountered: