sequelize/sequelize — pull request #538 by iamjochem (2013-04-11 10:26:26+00:00)
Title: Just Another attempt at DOA Getters and Setters

inspired by #70 and #373 (I repurposed some tests in #73, thanks to the author) I decided to have a stab at implementing getters and setters for DOA instances.

with this patch values for attributes defined in the Model are no longer stored as properties of DAO instances but rather they are stored in DAO.dataValues (with expection of 'association' attribute values, those still exist as plain properties on the DAO object, partly because I didn't want to f*** with the Association logic and partly because the values related to Association coupling are 'keys' and as such wrapping them in getters/setters seems a little bogus (why would you like to silently mutate them when setting/getting such key values).

all existing (and new) tests pass on the changes I made. (tests were added to 'buster' tests - yeehaw)

I still consider this work-in-progress but I'd love some feedback in the hope that this could eventually be merged (rather than die slowly at the bottom of the PR 'queue' ;-).

please ask questions, poke holes, etc!