Summary
With something like:
class Study(sqlalchemy.DeclarativeBase):
mandatory: Mapped[bool] = mapped_column(default=False)
class StudyFactory(SQLAlchemyFactory[Study]):
pass
study = StudyFactory.build()
# study.mandatory is True or False
Could the SQLAlchemyFactory support skipping fields with a default value (ie. same as declaring them with Ignore()), so that study.mandatory would be always False?
I understand always inserting random values is a strength, but if you're okay with less variety, resorting to default values could be nice. (That's what factory-boy would appear to do by default, AFAIK.)
Basic Example
No response
Drawbacks and Impact
No response
Unresolved questions
No response
Summary
With something like:
Could the
SQLAlchemyFactorysupport skipping fields with a default value (ie. same as declaring them withIgnore()), so thatstudy.mandatorywould be alwaysFalse?I understand always inserting random values is a strength, but if you're okay with less variety, resorting to default values could be nice. (That's what
factory-boywould appear to do by default, AFAIK.)Basic Example
No response
Drawbacks and Impact
No response
Unresolved questions
No response