-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: exclude implicit fields for sqlalchemy dto #2170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small docs changes
@abdulhaq-e Please change the target branch to |
02e95a5
to
0cb1251
Compare
Done. |
@cofin can you take a look at this one as well? |
2b260c2
to
6d77c51
Compare
This one is now resolved. The fix is waiting to merge into |
8664aa2
to
f526aae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this looks good except for the minor comments I left!
3ad15b7
to
19c1dfc
Compare
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/2170 |
7bc2a6e
to
ae092ec
Compare
use separate sqlalchemy dto config support Annotated allow overrides for hybrid properties and non-private Mark fields Apply suggestions from code review Update litestar/contrib/sqlalchemy/dto.py Co-authored-by: Alc-Alc <45509143+Alc-Alc@users.noreply.github.com> pythonic findWhere docs update use subclass implementation typo update lock file use poetry.lock from main Switch to private methods
ae092ec
to
766ad31
Compare
Pull Request Checklist
Description
SQLAlchemyDTO
can now be configured using a separate config object. This can be set using both class inheritance andAnnotated
:or
The new configuration currently accepts a single attribute which is
include_implicit_fields
that has a default value ofTrue
. If set to toFalse
, all implicitly mapped columns will be hidden from theDTO
. If set to"hybrid-only"
, then hybrid properties will be shown but not other implicit columns. Finally, implicit columns that are marked withMark.READ_ONLY
orMark.WRITE_ONLY
will always be shown regardless of the value ofinclude_implicit_fields
.Close Issue(s)