Question

I'm using CompoundJS and MongoDB (juggling-mongodb). This is the code I have:

schema.js:

var User = describe('User', function() {
property('_id', Number, {
    index: true
});
property('name', String);
property('email', String);
property('password', String);

set('restPath', pathTo.users);
    setTableName('users');
});

database.js:

module.exports = 
 { "development":
    { "driver":   "mongodb",
      "url": "mongodb://admin:1234@localhost/didgeridoo"
    }
 , "test":
    { "driver":   "postgres"
    }
 , "production":
    { "driver":   "postgres"
    }
 };

and i'm doing:

User.all(function(err, result) {
    //but here result is always empty and there is no error
});

Also there is not a connection problem and collections have data ;)

Anybody knows what can it be?

Thanks!

Was it helpful?

Solution

If anyone is wondering the same, you must know that setTableName() method is not yet implemented for all the ORM's as the time of this writing. Hope it helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top