@Henry wrote:
Hi guys, I have a strange problem. Let's say that I have two models
post
andcomment
.post
has ahasMany
relationship withcomment
. In the routeposts/:id
I can list all the comments correctly or apply to thempushObject
/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?
Posts: 1
Participants: 1