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
The above code doesn't update the book.chapters object in Firebase.
However, when "dirtying" the chapter object, it persists fine. For example,
store.find('book',1).then(function(book){store.find('chapter',1).then(function(chapter){book.get('chapters').addObject(chapter);chapter.set('title','Updated Chapter Title');// dirtying the chapter saves the object to book.chaptersbook.save();});});
The above code updates the book.chapters object in Firebase.
The text was updated successfully, but these errors were encountered:
@mattaddy this has to do with #41. The problem I'm having right now is that there is no way for the adapter to know when a relationship has been modified. I'm working on a temporary fix where I will cache relationships after each save so that I can check for added/removed items.
As an example, let's say we have a
Book
and aChapter
.Calling
addObject()
on abook.chapters
array, providing an existing, non-dirtychapter
instance doesn't persist after saving thebook
. For example,The above code doesn't update the
book.chapters
object in Firebase.However, when "dirtying" the chapter object, it persists fine. For example,
The above code updates the
book.chapters
object in Firebase.The text was updated successfully, but these errors were encountered: