Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: No Cursor (on fetch with condition) #83

Open
exos opened this issue Jul 2, 2015 · 0 comments
Open

Error: No Cursor (on fetch with condition) #83

exos opened this issue Jul 2, 2015 · 0 comments

Comments

@exos
Copy link

exos commented Jul 2, 2015

Hi, I'm developing an application with cordova for android and I'm using this library for local persistence with backbone, but I have an error when I do a fetch with condition (equal).

Mi collection:

var Products = Backbone.Collection.extend({
        database: db,
        storeName: 'Products',
        model: Product,
        ready: false,

        comparator: 'addDate', 

        byKid: function (kid, options, cb) {
            var self = this;

            if (typeof options === 'function') {
                cb = options;
                options = undefined;
            }

            if (typeof kid === 'object') {
                kid = kid.get('kid');           
            }

            this.fetch({
                conditions: {
                    kid: kid
                },
                success: function () {
                    self.ready = true;
                    self.trigger('ready');
                    cb(null);
                },
                error: function (m, e) {
                    self.trigger('error', e);
                    cb(e);
                }
            });
        },
       // ...

This execute the errback with a String (not Error object), saying: "No Cursor".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant