loopback-datasource-juggler/test
Miroslav Bajtoš bec9142100 Implement operation hooks for EmbedsMany methods
create() triggers
 - before save
 - after save

updateById() 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.

Limitations:

 - `before save` & `after save` hooks don't provide `ctx.isNewInstance`
 - async validations are not supported yet
 - `persist` and `loaded` hooks are not triggered at all

 - `before delete` hook does not provide `ctx.where` property and
    it's not possible to change the outcome of `destroy()` using this
    hook. Note that regular DAO does support this.

 - updating embedded instances triggers update of the parent (owning)
   model, which is correct and expected. However, the context provided
   by `before save` and `after save` hooks on the parent model is sort of
   arbitrary and may include wrong/extra data. The same probably applies
   to the scenario when deleting embedded instances triggers update of
   the parent model.

[back-port of #911]
2016-04-28 10:15:14 +02:00
..
helpers Implement operation hooks for EmbedsOne methods 2016-04-20 10:30:56 +02:00
operation-hooks.suite Implement operation hooks for EmbedsMany methods 2016-04-28 10:15:14 +02:00
CustomTypeForeignKey.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
async-observer.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
basic-querying.test.js eslint config 2.0 + remove extra empty lines 2016-04-19 17:06:04 +02:00
common.batch.js Insert copyright headers 2016-04-06 16:51:49 +02:00
common_test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
crud-with-options.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
datasource.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
datatype.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
default-scope.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
defaults.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
discovery.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
events.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
geo.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
hooks.test.js eslint config 2.0 + remove extra empty lines 2016-04-19 17:06:04 +02:00
include.test.js eslint config 2.0 + remove extra empty lines 2016-04-19 17:06:04 +02:00
include_util.test.js eslint config 2.0 + remove extra empty lines 2016-04-19 17:06:04 +02:00
init.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
introspection.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
json.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
loopback-data.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
loopback-dl.test.js eslint config 2.0 + remove extra empty lines 2016-04-19 17:06:04 +02:00
manipulation.test.js eslint config 2.0 + remove extra empty lines 2016-04-19 17:06:04 +02:00
memory.test.js eslint config 2.0 + remove extra empty lines 2016-04-19 17:06:04 +02:00
mixins.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
model-definition.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
optional-validation.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
performance.coffee Reformat the code 2014-01-24 09:09:53 -08:00
persistence-hooks.suite.js Implement operation hooks for EmbedsOne methods 2016-04-20 10:30:56 +02:00
relations.test.js eslint config 2.0 + remove extra empty lines 2016-04-19 17:06:04 +02:00
schema.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
scope.test.js eslint config 2.0 + remove extra empty lines 2016-04-19 17:06:04 +02:00
spec_helper.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
test1-schemas.json Reformat the code 2014-01-24 09:09:53 -08:00
test2-schemas.json Reformat the code 2014-01-24 09:09:53 -08:00
transient.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
util.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00
validations.test.js Run `eslint --fix` with config from master 2016-04-18 16:00:04 +02:00