In translation, it is not practical to defer resolution of recursed translators, so we need another way of deriving translation. Here's my proposed solution:
where Trans is a tuple of Function0[RecursiveSchemaTranslator[X, Y, OtherSchema[T]]. The implicit resolution of RecursiveSchemaTranslator will prepend thunked translators as it iterates through the subcomponents of a schema, and extractors/injectors for any LazyField encountered will look through the Trans tuple for a translator and will use that rather than continuing to derive one.
In translation, it is not practical to defer resolution of recursed translators, so we need another way of deriving translation. Here's my proposed solution:
where
Trans
is a tuple ofFunction0[RecursiveSchemaTranslator[X, Y, OtherSchema[T]]
. The implicit resolution ofRecursiveSchemaTranslator
will prepend thunked translators as it iterates through the subcomponents of a schema, and extractors/injectors for anyLazyField
encountered will look through theTrans
tuple for a translator and will use that rather than continuing to derive one.