create() triggers
- before save
- after save
udpate() triggers
- before save
- after save
destroy() triggers
- before delete
- after delete
The implementation here is intentionally left with less features
than the regular DAO methods provide, the goal is to get a partial
(but still useful!) version released soon.
[back-port of #904]
* Insert copyright headers (Miroslav Bajtoš)
* Relicense as MIT only (Miroslav Bajtoš)
* Fix Mongo compatibility issue (Amir Jafarian)
* Add automigrate to setup tables for replace test cases (Amir Jafarian)
* Remove next tag (2.x) (Amir Jafarian)
* Allow test folder to be published (Amir Jafarian)
* Fix tests for mysql (Amir Jafarian)
* Add forgotten unit test (Miroslav Bajtoš)
* Improve error message on connector init error (Miroslav Bajtoš)
* Update describe-operation-hooks (Miroslav Bajtoš)
* Fix missing connector error msg for db2, cloudant for 2.x (Candy)
* Implementtaion of replace (Amir Jafarian)
- drop custom findOrCreate implementation - memory connector provides
an atomic implementation out of the box now
- add new methods `replaceOrCreate` and `replaceByID`
- fix error reporting to include the stack trace in the console output
[back-port of pull request #847]
* Refactor `updateAttributes` (Amir Jafarian)
* Enhance "persisted" hook in DAO.updateAttributes (Miroslav Bajtoš)
* Add unit test to verify fix for #754 (Tom Kirkpatrick)
* Implement `findOrCreate` for memory connector (Amir Jafarian)
* Fix a bug when validation is off for findOrCreate (Amir Jafarian)
* Fix broken code fencings in the docs (Farid Nouri Neshat)
* Revert "Correct syntax for should and more" (Simon Ho)
* Fix test for shouldjs 8.0.2 upgrade (Simon Ho)
* Upgrade shouldjs to 8.0.2 (Simon Ho)
* Correct syntax for should and more (Amir Jafarian)
Make automatic validation optional on all CRUD methods in a loopback
model. This can be done in 2 ways
- set `automaticValidation` in the model settings
- set `validate` on the options passed when calling the crud methods
The options take precedence on the model setting.
By default the automatic validation remains true to be backwards
compatible