@@ -571,33 +571,6 @@ testing, migrations, or seeds. In these cases, you can turn the protection on or
571571
572572.. literalinclude :: model/042.php
573573
574- Working with Query Builder
575- ==========================
576-
577- You can get access to a shared instance of the Query Builder for that model's database connection any time you
578- need it:
579-
580- .. literalinclude :: model/043.php
581-
582- This builder is already set up with the model's ``$table ``. If you need access to another table
583- you can pass it in as a parameter, but be aware that this will not return a shared instance:
584-
585- .. literalinclude :: model/044.php
586-
587- You can also use Query Builder methods and the Model's CRUD methods in the same chained call, allowing for
588- very elegant use:
589-
590- .. literalinclude :: model/045.php
591-
592- .. important :: The Model does not provide a perfect interface to the Query Builder.
593- The Model and the Query Builder are separate classes with different purposes.
594- They should not be expected to return the same data.
595- For example, if you need to get the compiledInsert you should do so directly on the builder instance.
596-
597- .. note :: You can also access the model's database connection seamlessly:
598-
599- .. literalinclude :: model/046.php
600-
601574Runtime Return Type Changes
602575===========================
603576
@@ -634,6 +607,33 @@ This is best used during cronjobs, data exports, or other large tasks.
634607
635608.. literalinclude :: model/049.php
636609
610+ Working with Query Builder
611+ **************************
612+
613+ You can get access to a shared instance of the Query Builder for that model's database connection any time you
614+ need it:
615+
616+ .. literalinclude :: model/043.php
617+
618+ This builder is already set up with the model's ``$table ``. If you need access to another table
619+ you can pass it in as a parameter, but be aware that this will not return a shared instance:
620+
621+ .. literalinclude :: model/044.php
622+
623+ You can also use Query Builder methods and the Model's CRUD methods in the same chained call, allowing for
624+ very elegant use:
625+
626+ .. literalinclude :: model/045.php
627+
628+ .. important :: The Model does not provide a perfect interface to the Query Builder.
629+ The Model and the Query Builder are separate classes with different purposes.
630+ They should not be expected to return the same data.
631+ For example, if you need to get the compiledInsert you should do so directly on the builder instance.
632+
633+ .. note :: You can also access the model's database connection seamlessly:
634+
635+ .. literalinclude :: model/046.php
636+
637637Model Events
638638************
639639
0 commit comments