We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f780d75 + c64959e commit 7cd5c99Copy full SHA for 7cd5c99
1 file changed
user_guide_src/source/models/model.rst
@@ -69,7 +69,10 @@ Connecting to the Database
69
==========================
70
71
When the class is first instantiated, if no database connection instance is passed to the constructor,
72
-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,
73
+it will automatically connect to the default database group, as set in the database configuration.
74
+
75
+You can
76
modify which group is used on a per-model basis by adding the ``$DBGroup`` property to your class.
77
This ensures that within the model any references to ``$this->db`` are made through the appropriate
78
connection.
0 commit comments