Hi guys, I have a strange problem. Let’s say that I have two models post
and comment
. post
has a hasMany
relationship with comment
. In the route posts/:id
I can list all the comments correctly or apply to them pushObject
/ removeObject
to add or remove comments but there’s a particular case in which this doesn’t work:
- If I remove one comment using
removeObject
(I keep that record in a service) - then transit to
posts
- then transit back to
posts/:id
- and push the same comment with
pushObject
The template doesn’t update with the old record and, if I repeat the step 2 and 3 again, the old comment appears again.
What could be the reason why the hasMany
relationship doesn’t update in that particular case?