Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Allow Record transforms to be applied on createRecord #641

Closed
geoffreyd opened this Issue · 3 comments

4 participants

@geoffreyd
Collaborator

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

@mauritslamers

Completely agree... It is usually a source of misunderstanding too and "leakage" of SC type objects into the store itself.
I would therefore also propose to create a new hash out of the one passed in the createRecord function, to make sure that only a pure hash will be used in the store.

@mitchless
Collaborator

Can anybody comment on the original reason for taking ownership of the hash?

@publickeating

Closing as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.