Releases: tattersoftware/codeigniter4-relations
Hotfix Key Comparison
Fixes a backwards-incompatible strict comparison change wrought by CS Fixer (swear it was not me, team).
What's Changed
Full Changelog: v2.1.0...v2.1.1
With Deleted Relations
Adds support for including soft deleted items when then relation is controlled by a supported model.
What's Changed
Full Changelog: v2.0.7...v2.1.0
Coding Style
This is a housekeeping release to get this package up to speed with the latest development tools and practices from the CodeIgniter DevKit.
No content changes this release.
What's Changed
- Empty Object Return data from related tables by @eafarooqi in #19
- CodeIgniter DevKit by @MGatner in #35
New Contributors
- @eafarooqi made their first contribution in #19
Full Changelog: v2.0.6...v2.0.7
Bugfixes
Improve property handling
Fixes a bug where the $with
and $without
properties would not be handled appropriately.
Thanks to @sfadschm!
Remove constructors, Bugfixes
- Removes trait constructors to make them easier to integrate
- Improves test performance and stability
Bugfix method name
- Fixes an issue with a legacy method name that could cause an exception in
ModelTrait
Bugfix empty relations
Fixed a bug where EntityTrait could throw an exception if there was a related table with no related items.
Bugfix entity __isset
EntityTrait was missing a corresponding __isset()
method for its magic get, causing isset()
and empty()
requests to fail when there were accessible relations.
Refactored: Traits, Entity support, and more
This is a thorough update of the functionality of Relations. Of note to current users, the relations Model no longer exists. Functionality has been moved to ModelTrait, so in order to keep using relations-aware models you should remove the extended class and replace it with the trait:
class MyModel extends \CodeIgniter\Model
{
use \Tatter\Relations\Traits\ModelTrait;
Entities now support lazy-loading relations via magic methods. Read the docs for more info, but to add support simply include the trait and the necessary properties:
use \Tatter\Relations\Traits\EntityTrait
protected $table = 'users';
protected $primaryKey = 'id';
A number of bugs were fixed (or just written out) and a lot more tests were added. Up next: examples.