Skip to content

Releases: tattersoftware/codeigniter4-relations

Hotfix Key Comparison

14 Jul 20:14
7d96b9f
Compare
Choose a tag to compare

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

14 Jul 19:11
a3e0ea2
Compare
Choose a tag to compare

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

14 Jul 18:20
c443f1b
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v2.0.6...v2.0.7

Bugfixes

30 Dec 17:47
d033806
Compare
Choose a tag to compare
  • Fixes a bug where an Entity could have an existing attribute with value null, yet Relations would try to look it up as a table reference.
  • Updates the development toolkit

Improve property handling

08 Nov 18:31
f602add
Compare
Choose a tag to compare

Fixes a bug where the $with and $without properties would not be handled appropriately.

Thanks to @sfadschm!

Remove constructors, Bugfixes

13 Jul 20:31
b964ae2
Compare
Choose a tag to compare
  • Removes trait constructors to make them easier to integrate
  • Improves test performance and stability

Bugfix method name

23 Mar 17:37
ac1b4fe
Compare
Choose a tag to compare
  • Fixes an issue with a legacy method name that could cause an exception in ModelTrait

Bugfix empty relations

08 Jan 21:13
1d8acce
Compare
Choose a tag to compare

Fixed a bug where EntityTrait could throw an exception if there was a related table with no related items.

Bugfix entity __isset

21 Nov 20:50
aec1aa9
Compare
Choose a tag to compare

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

19 Nov 21:20
688f4ea
Compare
Choose a tag to compare

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.