I am working on sails js with mongodb with sails-mongo adapter , My problem is i cant fetch the result between two dates using sails-mongo.
So is there any solution for retrieve this data, actually i want to get total count of each day day's entries…
Hello people below is my model code for an user table...
module.exports = {
attributes: {
firstName: 'string',
lastName: 'string',
age: 'integer',
birthDate: 'date',
emailAddress: 'email'
}
};
It is creating user table with the above mentioned…
This works with sails-disk adapter but not with sails-mongo or sails-postgresql.
I have 2 models, Feed and Event, where Feed can belong to many Events.
When I create or save a new Feed record with an association to one or more Events (via "posts"…
This is my mongo db document
{
"creatorUid": "1234",
"creatorUserName": "userabc",
"title": "this is the first thread",
"description": "I like this thread and try to read it",
"threadOwner":…
I'm aware of the association feature of Waterline, however for this specific application I do not want to use it (I don't want the related models returned in my JSON-- I only want their ObjectIds).
Is there a way to create a field on my model that…
i'd like to use https://github.com/OptimalBits/node_acl module with http://sailsjs.org Framework. So I configured sails to use mongodb like this :
In /config/connection.js
mongodb: {
adapter: 'sails-mongo',
host: 'localhost',
port: 27017,
…
I'm currently developping a webapp with Sails.js + MongoDB.
I'm pretty new to Node.js and NoSQL world so I would like some recommendations.
Basically, an authenticated user will have the possibility inside his Dashboard to allow my webapp to…
I'm new to sails.js and find something strange. I have create a model user like :
sails generate api user
So i have access to :
http://localhost:1337/user/
and
http://localhost:1337/user/create?name=joe&test=true
But why sails allow me to add…
Save() giving me error like "Object has no method 'save'"
Country.update({id:req.param('country_id')},model).exec(function(err,cntry){
if(err) return res.json(err);
if(!cntry.image){
cntry.image =…
I'm at an impasse and I will be the first to admit that this info is more than likely hiding somewhere on the internet. At this point though my google results are just returning the same pages I have been to a dozen times already which leads me to…
I have been using sails.js on a project which will show posts near a users location, however while I have had no trouble in finding references and tools to geocode an address I cannot find any information on finding these by distance from another…
On my project all the tables should have the 'status' atribute, that verify if the record is active, inactive or deleted. So I'll have to select everytime with a "...where status = active".
There's another way to do that, just once, and use at every…
I'm working on a table using waterline and I just change on field form string to a relation ship and now when I run it I get the error [Error (E_UNKNOWN) Encountered an unexpected error] Details: TypeError: Cannot read property '_getPK' of…
I've been wondering if it would be feasible to create an app similar in functionality to Squarespace where once logged in, a user can create a 'micro-site' choosing hers/his own theme for it. The application would then link the user with a db,…
What is the correct way to set a db connection in Sails v.0.10.x for production use? I expected Sails to use the connection I referred to in production.js when I start my app in production mode (environment), but it doesn't. It seems to always…