Questions tagged [sails-mongo]

MongoDB adapter for Sails.js

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

400 questions
0
votes
1 answer

Correct way to pass multiple values for same parameter name in GET request in Sails

I'm looking into what is the correct way to pass multiple values for the same parameter name in a GET request in sails, but dont know how to achieve this. I have seen url like this http://url/action?id=a&id=b http://url/action?id=x,y,z So, can…
rash111
  • 1,307
  • 4
  • 19
  • 35
0
votes
1 answer

sails-mongo does not support TLL

attributes : { username : { type: "string",required:true,unique:true }, password : { type : "string",required:true}, email : { type : "string",required:true,unique:true}, expireAt : {…
Maxtermax
  • 145
  • 2
  • 12
0
votes
1 answer

how to install sails auth for manually configured mongoose ORM

Hi i removed waterline ORM from Sails JS and added mongoose, for that i followed the steps specified in the following link http://laurentschaffner.com/blog/from-waterline-to-mongoose-in-sails/ But now am facing issues in installing sails-auth…
Nikhil Mk
  • 151
  • 10
0
votes
1 answer

Using waterline advanced queries via io.socket

I'm trying to get a subset of underlying mongodb collection that fits in particular datetime range. So here is a code: io.socket.get('/myResource', { sort: 'myDatetimeField', where: { myDatetimeField: { '>':…
Radagast
  • 5,798
  • 3
  • 22
  • 18
0
votes
1 answer

Many to Many relationship Get by id is not working

I tried to create a user & pet model in Many to Many relationship using mongoDB and sailsJS, db creation and loading the data's are just fine i checked in mongoDB for dbs and collection it exists. when i try to get the user list and pet list its…
Anandapriyan S.D
  • 315
  • 4
  • 15
0
votes
2 answers

Find exactly match array or having all value of array in MongoDb

I have collection entry like that [ { shape : [{id:1,status:true},{id:2,status:false}] }, { shape : [{id:1,status:true}] } ] I want to fetch data which exactly match array , means contain all ele. of array. Ex. where shape.id = [1,2]…
Nishchit
  • 18,284
  • 12
  • 54
  • 81
0
votes
1 answer

Multiple database connections with sailsjs

It's possible to have a mysql connect for each registered and authenticated client ? For example: I need to have a different database for each client and I wonder if you can do this with the sailsjs.
João Silva
  • 167
  • 2
  • 9
0
votes
1 answer

Sails Wateline find with mongodb Object Id not working

I've an application with sails.js and mongodb. The sails rest api works fine for create. It also works fine when I access it as "http://localhost:1337/student" but not working when finding a specific document with id…
Mayur Tanna
  • 43
  • 1
  • 9
0
votes
1 answer

sails js save many to many is only one way

i have two models: user.js module.exports = { attributes: { ... profile: { model: 'Profile' }, groups: { collection: 'group', via: 'users', dominate: true }, roles: { collection:…
0
votes
1 answer

in sailsjs , 403 "You don't have permission to see the page you're trying to reach" error produce when adding new pages ,controllers and models

First i run my sails project in local , after i pushed in git repo and then i changed in online and then pushed in remote place. then i downloaded in my local. This changes produce permission problem. that is "You don't have permission to see the…
Aravinth
  • 397
  • 1
  • 4
  • 19
0
votes
2 answers

Sails-mongo many to many association not working

I am using sails 0.10.5 , and i have two models as below for many to many relation. but i am getting error while lifting app. model 1) Category.js attributes: { name: { type: 'string', required: true }, …
Nishchit
  • 18,284
  • 12
  • 54
  • 81
0
votes
1 answer

In SailsJS i want to get specific fields and display to html

This is my codes. i got result when i was using find() all fields but i want to use find with where condition that produce error. what should i change ?? index : function(req, res, next) { User.find({}).where({userlevel:{'=' :…
Aravinth
  • 397
  • 1
  • 4
  • 19
0
votes
2 answers

Sails.js - Have a 'contains' or query in url to fetch appropriate JSON data

My Sails.js application has a model called 'Ideas' and using the default blueprint REST api, I can access the contents of the collection when I go to: http://example.com/ideas/find Furthermore, by default, I can also limit the data to get specific…
user3721307
  • 199
  • 2
  • 12
0
votes
1 answer

How to add a new field in sails.js/waterline on "create"?

My School model has a name, address, etc. and an owner which is a User object. School.js module.exports = { attributes: { name: { type: 'string', required: true }, address: { type: 'string' }, owner: { …
Chris F.
  • 493
  • 5
  • 17
0
votes
1 answer

How do I write my Sails.js model so that associated categories aren't recreated for every new document?

I feel like there must be a simple solution to this, but I can't seem to find the right way to search for it online. I'm using a Sails server on Node.js & Express. Right now I'm trying to get a basic CRUD API working, so I've been sending post &…
carpiediem
  • 1,918
  • 22
  • 41