Do you have any list of the changes since the Code-along Video Tutorials where launched?
seth_tx has quit
seth_tx joined the channel
nathanstitt joined the channel
warbrett joined the channel
jvduf
So I am replacing all my backbone models now and I am running into an issue… What to do with child collections? I’ve written a basic workaround on the Backbone models but I thought Ampersand State supported children. From what I understand children are not collections of sub items, but just 1 sub item, right?
garrettn
I believe there is a separate property called "collections." I can't find it in the documentation, though.
jvduf
@garrettn yea but that’s for the parent collections. That’s not for child collections.
phated joined the channel
wraithgar
I don't think so fampinheiro
afaik the switch from role to data-hook is the only major one
fampinheiro
the only other I saw was the getAll to queryAll
but y, the data-hook was the major
wraithgar
getAll to queryAll falls under that umbrella in my head cause it was the same push. Good point.
[#58]title: Instantiating a model with collections should use add. | Hi, ran into an interesting problem today where I have a model that defines a collection of models that define their own idAttribute. In order to get the collection to de-duplicate it's children on instantiation I have to set `mainIndex` on the collection *and* pass `{ remove: false }` to the parent model's constructor....
jarredwitt
jvduf: I've been using the collections property in ampersand-state to attach a collection of children to my models. Here is a gist of what I do: https://gist.github.com/4aaa14b409b1132ef73b.git
seth_tx: I havent seen it so far. But might be a good idea to have
dabarnes joined the channel
jarredwitt: do the children inside a parent’s collection get the `parent` property set automatically?
ezanol joined the channel
ezanol has quit
jarredwitt
jvduf: hmmm, not sure I've been dealing with embedded records using that method
jvduf
jarredwitt: k, will find out along the way! Thanks.
warbrett joined the channel
ezanol joined the channel
sudobangbang has quit
sudobangbang joined the channel
legastero joined the channel
jarredwitt
jvduf: I really think it depends on how you're doing things on the backend, models aren't embedded I'm guessing?
jvduf
jarredwitt: no, that correct. It’s some kind of messaging system so the child models come on over a websocket and have to be added to the parent on the fly.
jarredwitt
jvduf: ah I see, well I think you could probably use a derived property get the children of the parent. Maybe if you stored all children in an app.children collection, you could fetch them using the parentId... just a thought
jvduf
jarredwitt: good idea, going to play with that once I have stubbed out all the basics. So far going pretty smooth!