Questions tagged [sails-mongo]

MongoDB adapter for Sails.js

Sails-mongo allows connecting to from using the ORM api.

400 questions
0
votes
3 answers

ReferenceError: " postIts.forEach(function(postit)" on list.ejs? postIts is not defined at eval (eval at compile

I need to loop through an object PostIts and display the "Id", " Title" with an ejs "forEach" Loop Am using sails.js "1.2.3" and mongodb on local host, but i get error ReferenceError : postIts is not defined at eval (eval at compile ? Here is the…
zak
  • 3
  • 4
0
votes
1 answer

ReferenceError in sailsjs application from docker container

I am working on sails application In my application I have used mysql and mongo adpater to connect with different database. Both db are hosted on somewhere on internet. Application is working fine in my local environment. I am facing issue once I…
baj9032
  • 2,414
  • 3
  • 22
  • 40
0
votes
2 answers

Create method in sails makes a new record but return bad Request

I have this model called Services /** * Services.js * * @description :: A model definition represents a database table/collection. * @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models */ module.exports = { attributes:…
Vikranth
  • 1,538
  • 1
  • 14
  • 23
0
votes
0 answers

How to fix error caused by userconfig probably by sails?

Im following this tutorial to set up a simple nodejs in docker with the help of sails. So far so good, but I keep getting this one error that it cant start the app because it misses a hook('userconfig'). I cant post the image due to a reputation…
SchoolPC
  • 1
  • 2
0
votes
1 answer

SailsJS / Waterline ORM : Update multiple entries using only one query

I'm currently using SailsJS framework, and i'm trying to update an array of elements using only one query in my MongoDB database. Here is what I'm doing but records are not updated.. Incoming JSON: { "cars": [ { "id":…
wawanopoulos
  • 9,614
  • 31
  • 111
  • 166
0
votes
1 answer

does waterline.js caches the collection and if it does is blowing up the server by taking up alot of ram?

We've recently crossed 130K documents in one of our collection. Since then we're facing higher memory consumption issue with nodejs. We're using sails waterline.js orm for querying mongodb. So any call made to db through waterline api for example…
Shahid Kamal
  • 380
  • 2
  • 14
0
votes
1 answer

how to connect local mongo DB instead of docker from sails JS application

My sails JS application looking for mongo db(Running on docker) , though local mongo db server is available. If docker is up with mongo db server then application connecting to docker based mongo-DB { name: 'MongoError', message: 'failed to…
Raj N
  • 249
  • 1
  • 18
0
votes
3 answers

sails-mongo createdAt date is not correct

I am using sails 0.12.0 with sails-mongo 0.12.3. I took over an existing application from "external" developers. I noticed that the "createdAt" date in present all mongo collections is incorrect, whereas the updatedAt date is correct. The createdAt…
pengz
  • 2,279
  • 3
  • 48
  • 91
0
votes
1 answer

How to connect to remote DB by request (in case of partial offline) in Sails 0.12

I have PC running in Kiosk mode (self-service kiosk). It has weak internet connection, so I use local MongoDB server for all data. But sometimes (ex. daily) I want to send statistics and other stuff to remote database. When I start PC, while…
NevaDA
  • 128
  • 6
0
votes
0 answers

SailsJs, database query returns an empty array

I'm using Sails.js in a production environment. My site queries a MongoDB database to return an array of objects. Each object fills a news section on my site. I have success with the development environment, however, when I try in production the…
0
votes
2 answers

How to set Sails Mongo model name with dots

I run the command sails generate model words.common It created in the model folder the model file Words.common.js but I got a server error: The Words.common model has an invalid name. Model names must start with a letter and contain only letters,…
Nati Y.
  • 31
  • 3
0
votes
1 answer

How to access model attributes of different controller in Sails.js?

I have two controllers/models in my Sails project which is Clubs and Members. One club can have many members. I try to put the id of 'Clubs' as a reference id (like a foreign key) in 'Members', so that I can retrieve the members of a club by using…
quratulhzm
  • 33
  • 1
  • 7
0
votes
0 answers

NodeJS SailsJS MongoDB sails-mongo module check if database connection works

I am in the process of upgrading a NodeJS application using SailsJS and MongoDB. I am using the 'sails-mongo' module to connect sails to mongodb. I have both the application and database up and running in separate docker containers using…
pengz
  • 2,279
  • 3
  • 48
  • 91
0
votes
2 answers

Sails.js response not returning object fields

Hello i am new to sails and would like some help with this. I am using sails with sails-mongo adapter and on my controllers when i am querying for data it returns okay and i can log the data fine but when i am trying to return the response back the…
0
votes
1 answer

How do I suppress all logging message in SailsJS/Waterline?

I have the following, but am still seeing a ton of Waterline logging messages. log: { level: 'silent', }
David
  • 606
  • 6
  • 11