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.