javascript - Parse JS - Query not return correct results -
so have simple code backbone-style web app
var $content = $('section').first(), document = new parse.query('document'), pid = "fssgsg323"; // document id database document.equalto('personpointer', { __type: "pointer", classname: "person", objectid: pid }).descending('createdat').find().then(function(documents) { alert(documents.length + ' documents found'); (var = 0; < documents.length; i++) { var $li = $("<li class='reportdocumentsitem'></li>"); var aux = new productlistitem({ el: $li, model: documents[i] }); $content.append(aux.$el); } }, genfail);
i have 10 entries db have "personpointer" right "pid", sometimes, randomly, while i'm using web app, alert shows me there 0 or less results have... refresh page, , works well
where mistake???what missing??
Comments
Post a Comment