diff --git a/edgy/core/db/models/mixins/row.py b/edgy/core/db/models/mixins/row.py index 430a4ca0..64e365c5 100644 --- a/edgy/core/db/models/mixins/row.py +++ b/edgy/core/db/models/mixins/row.py @@ -174,6 +174,7 @@ async def from_sqla_row( # Check for the only_fields # Pull out the regular column values. + class_columns = cls.table.columns for column in table_columns: if ( only_fields @@ -183,7 +184,8 @@ async def from_sqla_row( continue if column.key in secret_columns: continue - if column.key not in cls.meta.columns_to_field: + if column.key not in class_columns: + # for supporting reflected we cannot use columns_to_field continue # set if not of an foreign key with one column if column.key in item: