Skip to content
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

docs: improve $DBGroup description in Model #8074

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion user_guide_src/source/models/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ Connecting to the Database
==========================

When the class is first instantiated, if no database connection instance is passed to the constructor,
it will automatically connect to the default database group, as set in the configuration. You can
and if you don't set the ``$DBGroup`` property on your model class,
it will automatically connect to the default database group, as set in the database configuration.

You can
modify which group is used on a per-model basis by adding the ``$DBGroup`` property to your class.
This ensures that within the model any references to ``$this->db`` are made through the appropriate
connection.
Expand Down