Added daoFactory.findOrInitialize(params, defaults)
This functionality acts pretty much the same way as daoFactory.findOrCreate except you don't actually create the record, Sequelize would only .build() it. beforeValidate/afterValidate hooks will still run in the same manner as findOrCreate(). This functionality was inspired by: http://guides.rubyonrails.org/active_record_querying.html#find-or-initialize-by
Showing
with
90 additions
and
2 deletions
-
Please register or sign in to post a comment