For experts familiar with sails.js:
I have a Customers Model and to keep it simple lets say
/**
* Customers.js
*/
module.exports = {
attributes: {
firstName: { type: 'string' },
lastName: { type: 'string' }
…
well, I'm trying to create a user with Sails 1.0.0-42, the problem is that the callback lifecycle of the user model is not called. I have tried in many ways and nothing is called. Thanks in advance.
this is the code of Action2…
i use sails js 0.12.14 with mongodb. if i try to get a document after insert the document the document is empty
Products.create(product).exec(function(err, createdProduct) {
Products.find({_id : createdProduct.id}).exec(function(err,…
I'm working with a nodejs over heroku using mLab with mongoDB and SailsJS
I'm getting the same issue that are commented here:
https://github.com/balderdashy/sails/issues/2480
(Error: connect ECONNREFUSED 127.0.0.1:27017)
I'm already try all the…
This is how my code looks like:
User.native(function (err, collection) {
if (err) throw err;
collection.aggregate([
{
$match: {
id: req.params.id,
createdAt: {">=":…
I have MongoDB used in my application, now I need to connect to Postgresql to get some other data. But after I add connection and model for Postgresql, there's an error occurred when I started the application with sails lift. Following are the whole…
I want my sails controller to perform these steps:
-add word to Word table
-take the created word's ID and add it alongside with lesson's ID to a different table
module.exports = {
add: function(req,res){
var eng=req.param('english'),…
I've gone through the documentation a few times and am not certain on how to approach this inside Sails so looking for assistance.
I have Programmer, Project, and Feedback.
I want to link them so that Feedback can be submitted for a Programmer for a…
I have a Sails.js model called "products" which is a MongoDB collection. In the model, I have a beforeCreate() hook that generates a unique productId like '170921-00001' in the format 'YYMMDD-count` where count is the record number created for the…
I'm trying to add comments functionality into my Sails.js blog application. However, I don't seem to write my controller action correctly.
When I submit the comment form, the page starts to reload, but does not finish reloading.
Here's my…
in my sails controller I have implement a function to find users. but when I try to search using ObjectId it returns all the data. I couldn't find any reason. but it works when I create a new separate field as "userID", and find using "userID". I…
I am concerned that SailsJS + Waterline + MongoDB is not a winning combination anymore. Our application is using "Waterline Associations" more and more and I find its functionality is limiting my application.
I want to find by association, which…
Sails server:
Windows 10 64-bit
Sails.js 1.0.0-36
Node.js 6.10.2
MongoDB server:
Centos 7 on Virtualbox, host networking only
Mongodb 3.4.4, listening to all interfaces, no auth configured
I can successfully lift Sails, connect the datastore,…
I'm working on a project with Ember.js and Sails.js now i'm having an issue
in my controller,
i want to run a computed query and use "AND" clause but i don't know how to
do it, i tried to google it but had no luck
here is my…
I'm working on an Emberjs application and I've got quite far with it
but i'm having an issue and I think that I've looked at every corner in the
web without finding the solution
Now my problem is that I have a dropdown that queries record on change…