**** BEGIN LOGGING AT Wed Feb 25 02:59:58 2015 Feb 25 15:09:09 I have a Collection with many items, in a particular order. When the Source has an update, it send the new results using the success callback as before. Typically, there’s only one new item, which appears somewher in the middle of the array of results. However, the DataList displaying the Collection shows the new item at the end. Feb 25 15:09:40 Is there a way to update a collection, so new items show up in their proper place? Feb 25 15:14:28 DougReeder: rerender the DataList on update? Feb 25 15:14:32 Collection.fetch is called with strategy: "merge" Feb 25 15:15:10 Is there a hook for a callback when the underlying collection changes? Feb 25 15:15:51 Oh, I think I have one. Hmmm **** BEGIN LOGGING AT Wed Feb 25 15:40:32 2015 **** BEGIN LOGGING AT Wed Feb 25 15:46:16 2015 Feb 25 16:15:57 Okay, the issue is that my Source is returning the items in the correct order, but the Collection sticks with the old order, and just task the new item at the end. Feb 25 16:17:06 Is there a different stratgery that uses the given order? The docs don’t detail what the values for strategy are. Feb 25 16:18:03 not sure, but couldn't you just sort() when the collection gets updated? Feb 25 16:52:19 that works, but it takes a noticeable amount of time. I don’t see why I can’t tell Collection to use the order given. Feb 25 17:23:03 If I know the Source will soon return a new bunch of items, I can call Collection.empty(). Feb 25 17:23:31 But I don’t see how to do that from the Source. Feb 25 17:23:35 the order given? Feb 25 17:23:50 if new data is added to any sort of data structure Feb 25 17:24:05 it will be out of order unless inserted in a sorted manner Feb 25 17:25:17 I guess I want a strategy of “replace” rather than “merge" Feb 25 17:26:25 "merge" sounds like a weird strategy, honestly Feb 25 17:26:41 I feel like it should be called "add" if it doesn't add the entries in a sorted manner Feb 25 17:27:41 I suspect the distinction is between “add these items unconditionally” and “See if the id of these items matches an existing model” Feb 25 17:28:44 Maybe I want collection option purge=true. Feb 25 17:29:24 It kinda looks like “strategy” is not a meaningful option to pass to fetch. Feb 25 17:33:43 ah Feb 25 17:33:52 hehe Feb 25 17:50:01 Nah, purge means remove records that aren’t in the new dataset (which I probably want to handle deleting itmes) Feb 25 17:52:32 Okay, there’s no option on Collection for what I want. Feb 25 17:52:40 that sucks Feb 25 17:54:56 Guess I could work up a PR. Feb 25 18:14:11 FWIW, the approach I’ve decided on is to have the Source call collection.empty() when it has new data that replaces the existing data. Feb 25 18:39:04 I see **** ENDING LOGGING AT Thu Feb 26 02:59:59 2015