mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
Explicitly cite the expire_on_commit setting in the docs (#1177)
https://github.com/fastapi-users/fastapi-users/issues/1175
This commit is contained in:
committed by
GitHub
parent
525c1866a7
commit
be475e391a
@@ -16,6 +16,9 @@ Examples of `DB_URL`s are:
|
||||
|
||||
For the sake of this tutorial from now on, we'll use a simple SQLite database.
|
||||
|
||||
!!! warning
|
||||
When using asynchronous sessions, ensure `Session.expire_on_commit` is set to `False` as recommended by the [SQLAlchemy docs on asyncio](https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html#asyncio-orm-avoid-lazyloads). The examples on this documentation already have this setting correctly defined to `False` when using the `async_sessionmaker` factory.
|
||||
|
||||
## Create the User model
|
||||
|
||||
As for any SQLAlchemy ORM model, we'll create a `User` model.
|
||||
|
||||
Reference in New Issue
Block a user