Questions tagged [sails-mongo]

MongoDB adapter for Sails.js

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

400 questions
0
votes
2 answers

Waterline query for records created within the last 7 days?

Sails v12.14 connecting to MongoDB with Waterline Is there a way to do a find query for all records created within the last 7 days from the current date? I've tried searching for an answer, but I'm guessing I'm not hitting the right keywords to come…
0
votes
1 answer

Deleting all data in Sessions store

I'm using SailsJS with MongoDB. When users are authenticated, their data is stored in a collection named "Sessions". I'd like to know how I could access this collection so that I can remove all the data in order to force all users to have to log in…
Liquidice
  • 175
  • 1
  • 11
0
votes
0 answers

Vue.JS and Sails.JS query params "where" clause

I'm using a Vue Resource to send HTTP requests to my Sails.JS backend. Everything is working fine, except the only problem is the where clause in Sails isn't implementing the way it should. Here's my code: My Template:
Abdul-Elah JS
  • 685
  • 1
  • 16
  • 36
0
votes
1 answer

How to Speed UP Mongodb Query?

I am using Sails Js and MongoDB database. I want to optimize below Query. Users.findOne({id:user_id}) .populate('educations') .populate('educations.educationlinks') .populate('educations.educationlinks.verify_request_id') …
0
votes
2 answers

How to read from one database and write to other database in Sails.js

I have a multi-region database (MongoDB) infrastructure with replication. I want to record data to master DB and read data from other DB (replication) in the same region with the application server. How to implement it? Thanks
MonstroDev
  • 190
  • 2
  • 12
0
votes
1 answer

Save Image URL to the User in SailsJS

I'm creating an api using Sails JS v1.0.0 I have an action to upload an image to the server and it's working great but the problem I'm having is that I want to save the image URL to the user uploaded the image. It's the user profile image. The code…
Abdul-Elah JS
  • 685
  • 1
  • 16
  • 36
0
votes
1 answer

(Sails V1 + MongoDB) how to Create Dynamic collection/table in MongoDB using SailsJS?

i want to create Dynamic collection/table in mongoDB using SailsJS. Example 1- New User Registration. 2- On Registration Success, User's Unique (userID + table) table Create in MongoDB. 3- How can we access this table (UserID + table) from…
Spanchal
  • 465
  • 4
  • 16
0
votes
1 answer

req.session.flash = { } not working sails.js

I'm really new at sails.js and at the moment I'm using sails 1.0 . I've got the problem when I try to validate my signup page that the once the form is invalid the error message is shown above the form as expected but when I do the refresh it is…
user9102933
0
votes
0 answers

Can not edit the form from sails.js

Hey guys I'm really new at sails.js and I'm using version 1.0 of it. I just tried to create a CRUD application on adding article to my list and showing them. All goes right but when I want to delete or edit it says 404 error. I am going through this…
dipesh
  • 763
  • 2
  • 9
  • 27
0
votes
1 answer

Sails mongo unique: 'false' attribute not working

I would like to update the value multiple times using sails js and mongodb. However, when I try to update the value with the same value that exist previously, its giving me an error even though I've set unique: 'false': "code": "E_VALIDATION", …
Rahul Dagli
  • 4,301
  • 15
  • 47
  • 85
0
votes
1 answer

callback function in sails.JS v1

I am new to sailsJS. I want to add record in collection named skills. I have refered this document of sails js https://sailsjs.com/documentation/reference/waterline-orm/models/create I have request as : { "skillName": "tblPreffered…
Devang Mistry
  • 595
  • 1
  • 10
  • 22
0
votes
1 answer

Create dynamic collection in MongoDB using Sails.js

I am working with SailsJs+MongoDB API. I have to create New colletion in mongoDB .Name of colletion will be in request Parameter. example: Suppose I want to create 'Users' collection in 'mongoDbDatabase' database by following request. { …
Devang Mistry
  • 595
  • 1
  • 10
  • 22
0
votes
1 answer

Error: Consistency violation: A model references a datastore which cannot be found

I am new to using SailsJS and also I am using mongodb for the database to connect. I tried using Robo 3T to make sure that my connection is valid and check that the models are in it. However, when I tried lifting using sails lift I encountered this…
the_lorem_ipsum_guy
  • 452
  • 1
  • 12
  • 27
0
votes
1 answer

Sails swagger api documentation

I am using sails in my node js application. And want to implement swagger api documentation. And I follow Swagger Sails JS document. I got the result from my api doc. And my expected result from api doc . I have write the route in router.js file…
0
votes
0 answers

404 error on route defined in config/routes.js

I'm refactoring my Angular4+sails app so that both the views and the backend are available on localhost:1337. I've specified the routes in config/routes.js module.exports.routes = { '/': { view: 'homepage' }, '/register':{ …
K.W.
  • 59
  • 1
  • 10