Closed sfadschm closed 3 years ago
This is duplicate functionality to calling $model->with(false)
. I would like to move away from this current implementation of using booleans for "negative functionality" but I don't think withoutAny()
will be the solution.
For now if you need this just us with(false)
.
Totally right, I should have checked the PHPDocs, thanks :-D
No worries! Documentation is definitely behind on this library. So much to do in CodeIgniter and modules, docs & testing are still lagging ðŸ˜
Well as far as I am concerned, this module works great and saved me a lot of implementation time as I tend to rewrite relation loading with every (non-work related) project. Keep it up :)
Adds a function
withoutAny
to the ModelTrait.This might be particularily useful when using an
Entity
with theModel->save()
method. The function disables loading of all relation tables in this case. Otherwise, relations defined in the Model ($with = 'xxx';
) will be loaded to the Entity that is being updated and will makehasChanged()
return true even if no changes are submitted.Not really confident with the implementation. I guess setting
tmpWith = null;
would do the same. The functionality could also be realized by allowing$tables
to benull
inwithout($tabes)
and then handling it there.