sproutcore/sproutcore — Issue #641: Allow Record transforms to be applied on createRecord
Author: geoffreyd
Created: 2011-12-12 03:56:51+00:00
State: open
Labels: datastore, proposal

My proposal is to provide an `applyTransformsOnCreateRecord` property on the store, to change the behaviour of `createRecord`, so that when you pass in the datahash, it will apply the attribute transforms on the datahash passed in, instead of writing directly into the store.

This method (as opposed to providing a extra parameter on `createRecord`) would allow for the new behaviour without changing the current API, and as most apps will use either one approach or the other, this store level option should work well.

This would fix #166 #98 and #99