Open coaperator opened 3 years ago
@coaperator Thanks for posting! We'll take a look as soon as possible.
In the mean time, there are a few ways you can help speed things along:
Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.
For help with questions about Sails, click here.
Hi @coaperator, would you mind sharing an example of how you're trying to call the native method in your code?
Hi @coaperator, would you mind sharing an example of how you're trying to call the native method in your code?
Hi @eashaw, I made middleware, a model instance is passed to it
module.exports = {
find: (model, query) => {
return new Promise((resolve, reject) => {
return model.native((err, collection) => {
if (err) return reject(err);
return collection.find(query).toArray((err, result) => {
if (err) return reject(err);
return resolve(result);
});
});
});
}
};
Hi @coaperator, Would you be able to create a github repo of a minimal sails app that reproduces the issue you're having?
Node version: 12 Sails version (sails): - ORM hook version (sails-hook-orm): - Sockets hook version (sails-hook-sockets): - Organics hook version (sails-hook-organics): - Grunt hook version (sails-hook-grunt): - Uploads hook version (sails-hook-uploads): - DB adapter & version (e.g. sails-mysql@5.55.5): sails-mongo, last version Skipper adapter & version (e.g. skipper-s3@5.55.5): -
Hi i am using express + waterline + mongodb trying to call a native method on a model but it gives me an error I don't understand how to fix it any ideas would be helpful