Questions tagged [sails-mongo]

MongoDB adapter for Sails.js

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

400 questions
1
vote
2 answers

sails-mongo throwing error on 0.10.2

I'm trying to use waterline 0.10 with sails-mongo outside sails and everything is working fine but when I upgraded sails-mongo from 0.10.0-rc5 to 0.10.2 I'm getting now an error below is the error I getting. Waterline encountered a fatal error when…
ginad
  • 1,863
  • 2
  • 27
  • 42
1
vote
2 answers

How to store points(lat,lng) in Sails js using mongo-sails

I am trying to store the lat, lng in my model. I have defined my model as attributes: { point: {type: 'json'} } And i am passing the coordinates simply as [x ,y]. But it is storing the point as NULL. So please, if anyone knows how to deal…
live_alone
  • 159
  • 1
  • 11
1
vote
0 answers

Write Concern MongoDB with Sails.js

I have two question; To set write concern my mongo connection in Sails, I've changed the journal parameter to true in node_modules/sails-mongo/lib/adapter.js Is it enough? (Please ignore w:1 parameter) Can I use node-mongodb-native driver with…
efkan
  • 12,991
  • 6
  • 73
  • 106
1
vote
2 answers

Sails.js app variable data not being shown in view even though logs show it

I have a simple sales app in which in a controller I am querying a database. Retrieving the results, doing some manipulation on the data with async.each function and then sending the array to the view. Even though my logs are showing a the data in…
user434885
  • 1,988
  • 6
  • 29
  • 51
1
vote
2 answers

Waterline (Sails.js): AND conditions

I'm using mongodb with sails.js querying a model that contains the titles of torrent files. But I'm not able to perform a waterline query using the "AND" condition. I've already tried it in several ways but most of them return empty or simply, never…
Theadd
  • 38
  • 5
1
vote
1 answer

SAILS 0.10: Async & Promise issue when save to database

It seems I have an issue with async on promise. I have tested with sails-mysql, sails-mongo, sails-postgres version 0.10-rc-XX and the problem is happen. But when I use sails-disk, there's no problem. Look my comment below var storeInvoiceDetail =…
Pewh Gosh
  • 1,031
  • 1
  • 11
  • 29
1
vote
1 answer

Replica Set not working as expected

I have configured like below and my MongoDB don't need username or password: mongo: { module: 'sails-mongo', url: "mongodb://127.0.0.1:27017/mydb", replSet: { servers: [ { host: "127.0.0.1", …
Mark Thien
  • 1,108
  • 2
  • 22
  • 35
1
vote
0 answers

Sailsjs v0.10 sails-mongo not creating database and collections on sails lift

I'm using npm to install: sailsjs: npm install -g git://github.com/balderdashy/sails.git (v0.10 - master) sails-mongo adapter: npm install git://github.com/balderdashy/sails-mongo.git (also v0.10 - master) mongoDB version : 2.6.1 When executing…
Francois
  • 63
  • 7
1
vote
1 answer

sails js 0.10.0-rc7 fails to remove Many-To-Many associations

I use Sails@beta 0.10.0-rc5, I upgraded to rc7 and it my unit tests failed on Many-To-Many association! I've Many-To-Many relation between 'Center' & 'Teacher' models. ** I ADDED DEBUGGING CONCLUSIONS BELOW…
user2867106
  • 1,139
  • 1
  • 13
  • 31
1
vote
1 answer

Adding prefix in all controllers & services in sails

Hi Im new to node & sails and the same time doing some standards in my codes. In sails.js I currently have this, for example below api/ controllers/ TestController.js services/ TestServices.js Mostly I can access the view with using…
Nina
  • 141
  • 2
  • 14
1
vote
1 answer

\n doesnt make new line when display in html/page using sails

hi would like to know whether sails has its own function to format string variable to html? I have this scenario... in my controller, I have a variable whose value is something like this: var str = "Pellentesque habitant \r\nmorbi tristique senectus…
Nina
  • 141
  • 2
  • 14
1
vote
2 answers

How to make a .find() using a record id on one to one relationship

In sails-mongo(0.10.0-rc3/beta) it looks like the foreign id is converted to ObjectID so if I have a two models with one to one relationship how do I query using an id? Example: ModelA attributes: { user: { model: 'User' } } User.js attributes: { …
ginad
  • 1,863
  • 2
  • 27
  • 42
0
votes
0 answers

Sails.js error - Cannot read package.json in the current directory

When I run the pre-existing sails project, the warning appears in the cmd prompt. When I run "http://localhost:1337/" in the browser, than Ps: I am new to sails.js
0
votes
0 answers

Set Attribute of Json Object Using sails-mongo, Sails Js

I want to modify a json object stored in field "additionalCharges" for Vehicles in Database. The main goal is to update the specific without replacing the whole json object. This should happen when I make an assignment such as transport…
0
votes
0 answers

Sails fails to lift - Server failed to start (sailsjs, mongodb, nodemon sails lift --redis)

In VSCode When I run the sails lift sometimes it works, but when I tried "nodemon sails lift --redis" it shows this message. enter image description here error: Server failed to start. error: (received error: EACCES) error: error: Troubleshooting…