From bd7b3b51622d934094adb156978939102f42c6d5 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 23 Oct 2023 06:36:29 +0900 Subject: [PATCH 1/2] docs: improve description --- user_guide_src/source/models/model.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/models/model.rst b/user_guide_src/source/models/model.rst index 46bc5908cb41..880adfc0d9cb 100644 --- a/user_guide_src/source/models/model.rst +++ b/user_guide_src/source/models/model.rst @@ -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 to 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. From c64959eb84b6b44e154248d3aceb4c21664a2643 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 26 Oct 2023 05:45:40 +0900 Subject: [PATCH 2/2] docs: fix by proofreading Co-authored-by: MGatner --- user_guide_src/source/models/model.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/models/model.rst b/user_guide_src/source/models/model.rst index 880adfc0d9cb..db4ecd80b59d 100644 --- a/user_guide_src/source/models/model.rst +++ b/user_guide_src/source/models/model.rst @@ -69,7 +69,7 @@ Connecting to the Database ========================== When the class is first instantiated, if no database connection instance is passed to the constructor, -and if you don't set the ``$DBGroup`` property to your model class, +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