code: function sanitizeSavedData(data) {
          if (!data) {
              return data;
          }
  
          return data.map(function (val) {
              delete val.$$hashKey;
  
              //on serialization all functions go away. That means, we basically
              //have to create a fresh instance again, once we deserialize again
              var item = sofa.Util.extend(new sofa.models.BasketItem(), val);
  
              if (item.product) {
                  item.product = sofa.Util.extend(new sofa.models.Product(), item.product);
              }
  
              return item;
          });
      }
docs: http://mutablethought.com/2013/04/25/angular-js-ng-repeat-no-longer-allowing-duplicates/