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'd like to discuss an issue that I have faced recently using Ember data.
As I see it, the current functionality of Transforms is very limited, which shouldn't be the case. Specifically, there is no way to know anything about the Model or the attribute in Transform which makes a few use cases hard to implement. For example, ember-data.model-fragments#96.
What I suggest here is that there could be a way for the transform class to know which model and/or which attribute it's serializing/deserializing, so that it can have far more functionality. Then it will also be able to read attribute's meta and apply some filters according to that. I think there are many use cases for this (like String.trim().)
I'm not sure if this fits the concept of transform, but I believe it would be a good thing to have. What do you think?
The text was updated successfully, but these errors were encountered:
We have chosen to not support this API. @tomdale says this introduces too much complexity. We have decided to implement emberjs/rfcs#1 instead, which should allow you to do this kind of thing, even if it is less dynamic in nature.
I'd like to discuss an issue that I have faced recently using Ember data.
As I see it, the current functionality of Transforms is very limited, which shouldn't be the case. Specifically, there is no way to know anything about the Model or the attribute in Transform which makes a few use cases hard to implement. For example,
ember-data.model-fragments
#96.What I suggest here is that there could be a way for the transform class to know which model and/or which attribute it's serializing/deserializing, so that it can have far more functionality. Then it will also be able to read attribute's meta and apply some filters according to that. I think there are many use cases for this (like
String.trim()
.)I'm not sure if this fits the concept of transform, but I believe it would be a good thing to have. What do you think?
The text was updated successfully, but these errors were encountered: