MCPcopy Create free account
hub / github.com/dresende/node-orm2 / runAfterSaveActions

Function runAfterSaveActions

lib/Instance.js:137–148  ·  view source on GitHub ↗
(cb, create, err)

Source from the content-addressed store, hash-verified

135 });
136 };
137 var runAfterSaveActions = function (cb, create, err) {
138 instance_saving = false;
139
140 emitEvent("save", err, instance);
141
142 if (create) {
143 Hook.trigger(instance, opts.hooks.afterCreate, !err);
144 }
145 Hook.trigger(instance, opts.hooks.afterSave, !err);
146
147 cb();
148 };
149 var getInstanceData = function () {
150 var data = {}, prop;
151 for (var k in opts.data) {

Callers 2

finishFunction · 0.85
nextFunction · 0.85

Calls 2

emitEventFunction · 0.85
cbFunction · 0.85

Tested by

no test coverage detected