Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Collection fetch with options dont work

$
0
0

Hi,

I have a model "testModel":

exports.definition = {
    config: {
        columns: {
            "id": "String",
            "type": "String"
        },
        adapter: {
            type: "properties",
            collection_name: "testModels"
        }
    },
    extendModel: function(Model) {
        _.extend(Model.prototype, {
 
        });
        return Model;
    },
    extendCollection: function(Collection) {
        _.extend(Collection.prototype, {
 
        });
        return Collection;
    }
};
 
Alloy.Collections.TestModels = Alloy.createCollection('testModel');
I wanna fetch collection only with specific models so i use fetch() method with options parameter (http://backbonejs.org/#Collection-fetch) but is just dont work:
Alloy.Collection.TestModels.fetch({
    type : "specificType"
});
always fetch all models with any value of "type".

Any ideas how to fetch collection of specific models?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>