-
Notifications
You must be signed in to change notification settings - Fork 410
Open
Description
I am working with some SQLAlchemy models that represent database tables that have double underscores in the column names.
class SomeModel(Base):
column_a: Mapped[int]
column__b: Mapped[str]and I have factories to mock these models
class SomeModelFactory(BaseFactory[SomeModel]):
class Meta(BaseMeta):
model = SomeModel
column_a: 1
column__b: "test"But when I try to use these factories, I get the error,
Received deep context for unknown fields
I can't really find anything about this in the documentation, but it seems like there is a sort of convenience mechanic for sub factories called "deep context" that uses double underscores to refer to child fields (I think).
Is there a way to disable that for a given factory so all columns are treated as normal columns? Or some other way to solve this problem?
Metadata
Metadata
Assignees
Labels
No labels