Custom LoopBack Model with Created/Modified

api, loopbackjs, strongloop

Solution

There is no built-in way ATM. I suggest using an operation hook mixed with `new Date()`. See http://docs.strongloop.com/display/public/LB/Operation+hooks#Operationhooks-beforesave.

Problem

It looks like the built in LoopBack models are baked with "create/modified" date fields. Is there an easy way to add this to "generated" models? I've been looking through the docs but can't find anything in the model docs- http://docs.strongloop.com/display/public/LB/Defining+models Any suggestions?

Original source