geddy / model

Datastore-agnostic ORM in JavaScript
265 stars 55 forks source link

Lifecycle event beforeUpdate not working #226

Open Duvel opened 10 years ago

Duvel commented 10 years ago

If i add this event, it isn't triggered:

this.beforeUpdate = function() { console.log(this); var self = this; }

Kind regards,

Remco

mde commented 10 years ago

Are you going through the updateProperties method, or just updating props directly on the instance?

Duvel commented 10 years ago

I'm using the generated web form and just click save there.

Groetjes, Remco

Op 7 sep. 2014 om 01:58 heeft Matthew Eernisse notifications@github.com het volgende geschreven:

Are you going through the updateProperties method, or just updating props directly on the instance?

— Reply to this email directly or view it on GitHub.

mde commented 10 years ago

The update method on the generated scaffold code uses updateProperties, so that sounds like it could be a real bug. I'll take a look.