1.0.1
This is our first maintenance release that solves several important issues.
- Change:
$m->insert()will return ID and not clone of$m. Cloning was causing some problems. - Change: calling
ref()on object without active record will return you object without active record instead of exception - Change:
$m->ref()into non-existant hasOne() relation then saving it will update field inside $m. - Added ability to call
save([$data]), which will combine set() and save() - Added support for
$model->title_field - Added $m->isDirty()
- Added afterUnload and beforeUnload hooks.
- Added support for automated model reloading
- Added support for advanced patterns described here:
- ability to implement soft-delete, audit
- support to override default method actions, e.g. delete()
- support to verify updates with afterInsertQuery
- ability to create fields with unique values
- Added support for Related Aliases. Now you can hasOne() hasMany() to itself.
- Fix: when you update field from join and then immediatelly save()
- Fix: when you join on existing field
- Fix: update and delete no longer try to use join or aliases
- Fix: setting different values twice wouldn't reset dirty status if you return to the original
- Fix: dirty flags are still available for
afterSave()method (so that you know which fields were saved) - Documented $m->withID();
- Updated to latest version of DSQL
Included PRs: #75, #74, #73, #72, #71, #70, #65, #63, #61, #58, #55