Skip to content

Commit

Permalink
Merge pull request #8074 from kenjis/docs-model-DBGroup
Browse files Browse the repository at this point in the history
docs: improve $DBGroup description in Model
  • Loading branch information
kenjis authored Oct 25, 2023
2 parents f780d75 + c64959e commit 7cd5c99
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit 7cd5c99

Please sign in to comment.