I have sails js 0.11v and mongodb, when i use .update function of sails js, Except enum attrribute every other value is updating.
Here is my model
module.exports = {
schema: true,
attributes: {
name: {
type: 'string',
…
I'm using sails.js with mongodb for my backend. And I've heard that connecting to database for each request can be really expensive, that's why other non-single threaded programming languages hold a connection pool for database right? So I wonder…
I'm struggling upon a problem related to Sails.js and Waterline associations.
The database technology is mongoDB and I'm using the sails-mongo adapter.
I have a model User which has an association with a Role model. The association is of…
I am little familiar with sails and mongoDB, Here i want to know how to sort the data while selecting from collection in DESC order.
Here i enclosed my controller function:
listall : function(req, res){
var userId =…
I'm using sails.js for a project and everything is going fine so far. Except that I don't know how to have an optional association between my two models. If I don't specify one, then if I use populate() it takes the first one available.
I have those…
I am newbie in sails.js , I am trying to create crud and login using sails js. I want to fetch record of loggedin user from multiple collection like user profile details and post done by login user.
I dont know how to query from multiple collection…
I am using Sails v0.11 and am developing an standalone importer script in order to import data to mongoDB and - that is now the not-working part - build the associations between the models.
For this process I introduced temporary helper properties…
I am new in sails js and getting some issue my update query show updated successfully but it does not update the record in mongodb collection. I don't where i am doing silly mistake.
Here is controller function
edit: function(req, res){
var uid…
I am new in sails.js , trying to create crud using mongodb and sails.js , Getting some issue while delete a record from the list of record. Here i attach my all working file , Please guide me
// controller file function
removePost: function(req,…
Good day all, can someone suggest me which async function should i use?,
in my case, I need an output the 1st member of each group.
*** note this is just a example of the flow of my program.
/*
Grouplist groupmember
Id |…
I am trying to access Model component via sails.models.['CollectionName'] as these CollectionName will be dynamically sent into this piece of functionality. But it is throwing undefined error.
/sails12.rc3/myapps/api/services/UserService.js:86
…
I'm trying to create google and facebook OpenId Authentication using passport.js.
When i trying to login via google and facebook but it showing [TypeError: Cannot read property 'userId' of undefined]
please resolve this error.
Here i attached my…
I'm trying to use .native() to update multiple records. Here's my code:
// Controller
Pet.native(function(err, collection) {
// For demo purposes only. Correct owner is returned previously from Owner.findOne()
var owner = {
id:…