Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

strongloop-archive/loopback-faq-model-hooks

Repository files navigation

DEPRECATED AS OF 2016-09-19


#loopback-faq-model-hooks

NOTE: Model hooks are now deprecated. Use operation hooks instead. See loopback-faq-operation-hooks for an example.

$ git clone git@github.com:strongloop/loopback-faq-model-hooks.git
$ cd loopback-faq-model hooks
$ node .

##How do you use model hooks?

  1. Determine which hook you would like to use (afterInitialize, beforeValidate, ...)
  2. Add the hook to your model.js file

##What model hooks are available? See http://docs.strongloop.com/display/LB/Model+hooks. All model hooks are now deprecated, except for afterInitialize.