Lionel Viet

Results 23 issues of Lionel Viet

https://github.com/locks/ember-localstorage-adapter/issues/135 https://github.com/locks/ember-localstorage-adapter/issues/105

Hello, As of now the performance of the LSAdapter seems not great, due to the fact that each record fetched from / saved to the store is a direct copy...

From https://github.com/emberjs/data/blob/v2.1.0/packages/ember-data/lib/system/relationships/state/relationship.js#: setHasData: ``` /*All relationships for a newly created ('store.createRecord()') are considered known ('hasData === true'). */ ``` => serializeHasMany: ``` serializeHasMany: function(snapshot, json, relationship) { //.. //json[payloadKey] =...

I found this led to huge improvements in performance, at least when using reduceComputed / @each obervers on large arrays: in findMany: ``` javascript //... if (opts && typeof opts.allowRecursive...

a post and many comments exist and are stored offline. When refreshing the page, the offline models are created, and no online models exist. If refreshing only the post from...

``` javascript _serializeAssociations: function() { (..) var pushToCollection = function(snapshot) { if (typeof(snapshot)==='undefined') {return true;}//added (..) }, ```

When using this.emberSync.find('post'), after fetching data from the server, the relationships are not pushed to the offline Store, only to the online Store: in ActiveModel serializer, extractArray pushes the relationships...

Small piece of code for this, use ``` javascript this.emberSync.findOfflineFirst('posts'); ``` or ``` javascript this.emberSync.findOfflineFirst('post','27'); ``` to get a promise filled with offline store results if any (without fetching the...

I had the issue described in http://stackoverflow.com/questions/21724343/no-container-in-jsonserializer on my app, using an online store initializer as described in the docs. Solution was to get rid of declaring the serializer in...

I'm not sure in which cases ember doesn't returns promises for relations (it seems to be the standard behaviour with ember-data, even for async=false relationship), but in case it helps...