Enhancement: DTOs: support fields defined in mixins and declared_attr
fields while excluding implicit fields
#163
Labels
enhancement
New feature or request
Summary
SQLAlchemyDTOConfig
has a field namedinclude_implicit_fields
, it is eitherTrue
,False
or'hybrid-only
.The first issue here is that there is another type of mapping that can be defined using
declared_attr
(see https://docs.sqlalchemy.org/en/20/orm/mapping_api.html#sqlalchemy.orm.declared_attr). Currently the only way to show this mapping is to setinclude_implicit_fields=True
.The use case is to enable showing
declared_attr
fields while still hiding implicitly mapped columns.The second issue is fields defined in a mixin. They will also not appear unless
include_implicit_fields=True
Basic Example
Here is a small example based o SQLAlchemy docs:
Drawbacks and Impact
No response
Unresolved questions
No response
Funding
The text was updated successfully, but these errors were encountered: