How do you go about returning back a composite model, I think that’s the term at least, for in a RESTful URL such as /people/1/address
.
In this case return me the model of PersonAddress
of the person with the ID 1. Address would never hang off anywhere except a person so creating /address/1
wouldn’t make a whole lot of sense.
The endpoint for PersonAddress
would have to be /person/:person_id/address
In the past, we used Ember Restless (one of many persistance libraries) where we basically overrode the BuildURL function to handle this use case. Is this something that comes for free with Ember Data or would it require some hacking?
Thanks