-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embeded relationship data not loading #16
Comments
First I would not use ES6 classes because Mirage isn't designed to work with them yet. Second, just to clarify what are you expecting |
Thanks for getting back to me.
Once I make the ES6 class corrections I'll let you know if that test does anything. |
Just switched my Mirage Serializers to not use ES6 classes. Get the same results as before unfortunately. |
@Subaku Sorry you're still having trouble. Could you write out the exact JSON you're expecting to be returned from |
Even better would be to share a reproduction of the issues – that's usually the fastest way to get help! |
Here's a repo with a slimmed down version of my app that should replicate my issue. I ultimately suspect I've just neglected to declare or configure something... |
So sorry for the delay! Busy holiday season. Looks like you're just requesting all So if you want the rest of the data you'll need to change your query. What data are you trying to get? |
No worries. Hope your holiday was good :) I was attempting to get all related fields back as embedded records. In my screenshots above both location and assignedTo are related to the Place model but are different Place records. I was expecting both to be included in the response given the configuration I had set on the Mirage AssetLocationSerializer. The |
In your demo app the URL requested is for all Are you saying if you were to request |
FYI: Transferred this to our Discuss repo, our new home for more open-ended conversations about Mirage! If things become more concrete + actionable we can create a tracking issue in the main repo. |
Hello,
Have an issue I don't understand. I've an Ember-Data model,
AssetLocation
that has several belongsTo relationships. I can get one relationship to load data but the others don't. I confirmed that the mirage server is creating the data behind the scenes so I think this is a config or serialization issue.Here's my Mirage serializer for the model.
Here the actual Ember-Data serializer for the same model.
Here's a sample request made from my app.
The embedded assets get created just fine. It's the others that don't. So assignedTo and seenBy for example never get created in the store. Am I missing something here?
The text was updated successfully, but these errors were encountered: