I’m in the process of hooking Ember Data up to an API that uses numbers for IDs. Payloads from the API are deserialized without a problem, but unfortunately when models are sent to the API all ids are serialized as strings.
I understand this is because the store treats all ids as strings internally, but is there any easy way to convert them back to numbers during serialization?
As I need model ids (when included), relationship ids (i.e. belongsTo and hasMany) and the ids within embedded models to all be numbers the only way I can see to do this is to override
serialize method - this works, but having to reimplement all the serialization logic seems a bit unnecessary.
Am I missing an easier solution? Any suggestions?