My sails application not able to connect to locally running mongo db instance
local.js is like below
module.exports.connections = {
sailsMongoDBServer: {
adapter: 'sails-mongo',
host: '127.0.0.1',
port: 27017,
…
I am using waterline v0.13.5 package with expressjs.
I get an user error { userError: The attribute 'str' on the 'action' model contains invalid properties. The property 'minLength' isn't a recognized property. when trying to use min, max (with…
I have a Users model stored in MongoDb and a UserTypes model stored in MySQL.
When I try to create a new User:
Users.create({name: "Shivam", userType: 1})
I get following error:
{ AdapterError: Unexpected error from database adapter: Invalid…
Sails 1.x saves createdAt and updatedAt as string instead of Date type with mongodb.
the problem is that i have aggregation pipes with $add (adding days, months, secs, etc...) with the createdAt and updatedAt fields and Mongodb throws error that…
Anyone can help??
error: A hook (orm) failed to load!
error: Could not tear down the ORM hook. Error details: Error: Consistency violation: Attempting to tear down a datastore (default) which is not currently registered with this adapter. This is…
I want to Display Table from specific index location. My source code was displaying all the values contained in the database. Is there any way to display from a specific location.
import React,{Component} from 'react';
import…
I'm using sails-mongo in my nodejs application, and my config looks like this:
mongoDb: {
adapter: 'sails-mongo',
url: 'mongodb://prod_user:prod_password@router-1-incloud:16888,router-2-incloud:16888/db_name',
auto_reconnect: true,
poolSize:…
In Sails 1.0, I'm trying to use sails-mongo for dev and production and sails-disk for test. Before version 1.0 I could do this, but now I receive an error:
error: Error: In model 'user', primary key 'id' must have either
'required' or…
I'm using mongodb and sails framework, Production.find({}) is working normally
but Production.aggregate([]) is returning an error
Production.aggregate() is not a function
module.exports = {
list : function(req,res) {
…
I'm having a problem in sails js image uploading using skipper gridfs.
My connection is fine but however when I upload an image it logs an error to my terminal
MongoError: error processing query: ns=admin.uploads.chunksTree: $and
files_id $eq…
I have a User model and user model has one to many relationship with Episode model. Is it possible to send only Episodes which are associated with the current user without changing the EpisodeController?
I'm working with EmberJS and SailsJS. Now I've been asked to make a statistics page and handle the filtering process in the SailsJS.
I have a model for departments and another model for requests the relationship between these models is (request…
I am using sails 1.0.0-37 and sails-mongo 1.0.0-10 .
When sails is lifted, if mongo db server is up and running, everything is okay. If mongo db goes down, and the node.js tries to access the mongo db as part of a functionality and it times out, an…
I have a function in my Sails 1.0 application that adds a new user to the MongoDB and then at the end should return the User object as JSON...
The User does get added to the collection but it throws an error when trying to get the _id of the new…
I am having 3 collections, say A, B, C. In all 3 collections I have a field for email which is unique in respective collections. But now what I need is that email should be unique through out the database.
How can this be achieved?
I am using sails…