Hi,
i am creating a :
var DM = loopback.createModel(JSON.parse(JSON.stringify(datamodel)))
Test1.attach(DM)
app.model(DM)
The model is available in Explorer for all CRUD functions via GET, PUT,
POST ...
That works well. BTW, the new model is based on PersistedModel
if I create the model via the standard way in common/models in a JSON i get
also access to the ctx of my Model via
MyModel.observe('after save', function(ctx, next) {
console.log('supports isNewInstance?', ctx.isNewInstance !== undefined);
next();
});
But not if I create the model via the code mentioned above. What am I
missing ? Any idea ?
Best, Michael
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/43560d30-caac-4ac1-8bbe-80187af347c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.