You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using Rest-Hapi and it provides functionality to create auto API for association. But just wondering to know why it not update the associated model with the single call. We need to call the separate API for updating associated model. For example:-
Suppose i have may to many association between FirstResponder and Occupants , so as Occupant call the API for assigning the FR , so i need FR _id into Occupant and Occupant _id into FR, but for that i need to call to separate API from front-end, first that update FR _id into occupant and after the response (then block ) of that API i called another API that update Occupant _id into FR (FirstResponder). So if i am not wrong means if both have many to many association than automatically the association handling should be there means i just made one call and to whom the model is associated auto updated with the other model _Id.
Any explanation is much appreciated on this.
Thanks
The text was updated successfully, but these errors were encountered:
You should only have to call the API once to update the association. There was a bug in a previous version that required two API calls to update an association, but this has since been fixed.
Hi,
I am using Rest-Hapi and it provides functionality to create auto API for association. But just wondering to know why it not update the associated model with the single call. We need to call the separate API for updating associated model.
For example:-
Suppose i have may to many association between FirstResponder and Occupants , so as Occupant call the API for assigning the FR , so i need FR _id into Occupant and Occupant _id into FR, but for that i need to call to separate API from front-end, first that update FR _id into occupant and after the response (then block ) of that API i called another API that update Occupant _id into FR (FirstResponder). So if i am not wrong means if both have many to many association than automatically the association handling should be there means i just made one call and to whom the model is associated auto updated with the other model _Id.
Any explanation is much appreciated on this.
Thanks
The text was updated successfully, but these errors were encountered: