(self, couch_object)
Migrate submodels from the SQL model to the Couch model. This is called
        as part of ``_migration_sync_to_couch``
Migrate submodels from the SQL model to the Couch model. This is called
        as part of ``_migration_sync_to_couch``
Migrate submodels from the SQL model to the Couch model . This is called as part of _migration_sync_to_couch
def _migration_sync_submodels_to_couch(self, couch_object):
        """Migrate submodels from the SQL model to the Couch model. This is called
        as part of ``_migration_sync_to_couch``"""
        for spec in self._migration_get_submodels():
            couch_submodels = []
            for sql_submodel in getattr(self, spec.sql_attr).all():
                couch_fields = {
                    couch_field: getattr(sql_submodel, sql_field)
                    for couch_field, sql_field in zip(spec.couch_fields, spec.sql_fields)
                }
                couch_submodels.append(spec.couch_class(**couch_fields))
            setattr(couch_object, spec.couch_attr, couch_submodels)
def _migration_sync_submodels_to_couch ( self , couch_object ) : for spec in self . _migration_get_submodels ( ) : couch_submodels = [ ] for sql_submodel in getattr ( self , spec . sql_attr ) . all ( ) : couch_fields = { couch_field : getattr ( sql_submodel , sql_field ) for couch_field , sql_field in zip ( spec . couch_fields , spec . sql_fields ) } couch_submodels . append ( spec . couch_class ( * * couch_fields ) ) setattr ( couch_object , spec . couch_attr , couch_submodels )