You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can do this currently, I just wanted to bring this to your attention so people don't start passing options to defineResource and screw themselves up when you want to add features... For example...
I'm using angular-data today and do this:
DS.defineResource({name: 'user',foo: 'bar'});
Then tomorrow, you decide that we really need to add another option to defineResource and we want to call it foo.
I upgrade.
The internet breaks... Or something...
Here's my proposed solution: Give us a field for stuff like this called meta and then explicitly create the definition, don't just make the object we pass you as the definition. We will hate ourselves later I'm sure...
The text was updated successfully, but these errors were encountered:
That's a good idea. I can just make a rule that going forward, meta is reserved for devs to use.
I don't reuse the object that's passed to defineResource, I create a new Resource that uses some prototype stuff to easily hook into default values and lesser default values configured via a provider.
I can do this currently, I just wanted to bring this to your attention so people don't start passing options to defineResource and screw themselves up when you want to add features... For example...
I'm using angular-data today and do this:
Then tomorrow, you decide that we really need to add another option to
defineResource
and we want to call itfoo
.I upgrade.
The internet breaks... Or something...
Here's my proposed solution: Give us a field for stuff like this called
meta
and then explicitly create the definition, don't just make the object we pass you as the definition. We will hate ourselves later I'm sure...The text was updated successfully, but these errors were encountered: