Best practices with many to many relationships in JsonAPI


#1

Hi guys,

how do you let the server know that there is a relationship many-to-many between two models when storing them? I know that in ember-data a relationship of this kind can be easily implemented by using hasMany in both models but when you want to save them, how does the server know that there’s a relationship between them? because in the models there’s no info about their relationship (apart from the hasMany property). Do you customize the serializer to send both models together? do you add info in the meta to let the server know that it has to do something else with that record?