Just wondering if there is an easy way to auto-populate an object’s related fields on an instance-by-instance basis rather than globally in the config file, or, for the entire class.
I’d like to include all related models for a single instance without chaining a ton of include_related() functions.
Something like this would be nice:
$x = new Model();
$x->include_all_related();
include_all_related()function to the model to simply save having to write the code over and over? - froddd$has_many()and$has_one()), I also have to head into theinclude_all_related()function and make adjustments there too. I've asked it on DMORM CI Forum too. Our solution is a temporary fix, when I'm less busy, and provided I don't get an answer, I'll dig into the core and create a method myself :D - Jordan Arsenoinclude_all_related()function if I just read in the$has_oneor$has_manyarrays. facepalm. See solution below. - Jordan Arseno