Closed nyon closed 6 years ago
@nyon Thank you for posting — I agree that's confusing!
We have some docs in the "Seeding your database" section of the guide here: http://www.ember-cli-mirage.com/docs/v0.3.x/seeding-your-database/#relationships-with-fixtures. But I absolutely agree they should be added to the Fixtures API reference doc as well.
Would you mind helping me out with this? If you go to the Fixtures page and click "Improve this page" at the top right, you'll be able to propose a change to the guide. Just a few short examples of setting belongsTo and hasMany IDs should be sufficient.
I'm relatively new to ember-cli-mirage and got stuck with the convention, that belongsTo associations need to be suffixed with
Id
in order to work. I think other users could stumble upon that same mistake in the future. I thoughtmeant
in your fixture specification. This was not the case. I had to append the
Id
suffix.I propose to add a description to the fixture chapter (http://www.ember-cli-mirage.com/docs/v0.3.x/fixtures/) in order to clarify this.