Codeigniter Model VS Query Builder |
(03-27-2020, 02:37 PM)includebeer Wrote: That’s because you can call the query builder directly from the model class : https://codeigniter4.github.io/userguide...ry-builderYes, I think that was said. Maybe it wasn't stated clearly, but the implication is there. That "feature", plus the Model having functions that look like query builder functions (but are not) is, as the OP said, confusing. Actually, it's more than confusing it is a rampant disregard for the OOP concept of encapsulation. Why is that an issue? Because it leads to questions like the OP. This is not the first time that questions have been asked about apparently buggy behavior that's not really a bug, but a misunderstanding about what really going on behind the scenes. A developer has to be keenly aware of which calls are Model and which are Query Builder lest they get unexpected results. |
Messages In This Thread |
Codeigniter Model VS Query Builder - by shinseiten - 03-25-2020, 09:59 AM
RE: Codeigniter Model VS Query Builder - by dave friend - 03-25-2020, 10:53 AM
RE: Codeigniter Model VS Query Builder - by includebeer - 03-27-2020, 02:37 PM
RE: Codeigniter Model VS Query Builder - by dave friend - 03-28-2020, 02:07 PM
RE: Codeigniter Model VS Query Builder - by includebeer - 03-30-2020, 01:27 PM
RE: Codeigniter Model VS Query Builder - by dave friend - 03-31-2020, 08:43 AM
RE: Codeigniter Model VS Query Builder - by includebeer - 03-31-2020, 11:11 AM
RE: Codeigniter Model VS Query Builder - by PwrSrg - 02-19-2021, 09:09 AM
|