The Waterline feature of Sails allows you to designate an entity's attribute as an 'array' type: module.exports = { attributes: { items: { type: 'array' } } } In MongoDB, the $pull operator is available for update queries, enabling the removal ...
When attempting to include sails-mongo in my Sails project by running npm install sails-mongo --save, I encountered the following error: ~/newWebApp $ npm install sails-mongo --save npm ERR! Linux 3.13.0-24-generic npm ERR! argv "node" "/usr/bin/npm" " ...
I'm currently working on sorting my query for the Reddit hot algorithm. The sorting is based on time, and unfortunately I am unable to use beforeUpdate or beforeCreate hooks in this case. I need to incorporate a calculation while querying, but so far I hav ...
Recently, I embarked on a project using Sailsjs with DynamoDB as the database. During my research, I came across a helpful package at https://github.com/dohzoh/sails-dynamodb. The documentation provided detailed instructions for the initial setup. After i ...
Can Sails.js and/or Waterline support full text search? While PostgreSQL does support full text search, it appears that the PostgreSQL adaptor for Waterline may not have this feature. Is an efficient full text search achievable with Waterline's cont ...
Currently, I am attempting to understand how promises function in sails. So far, I have been successful in passing data from waterline queries using .then, however, I have run into an issue when trying to use .spread. Specifically, I am receiving a 'f ...
After working with a module named 'sails-mongo,' I am trying to upgrade it to the most recent version using the command below: npm update sails-mongo --save I have also attempted uninstalling and reinstalling. I experimented with sails-mongo@latest and s ...
Note: I have posted an issue regarding this on the Waterline repo, but unfortunately, I have not received a simpler solution than my current workaround. Within my User model, along with default attributes such as createdDate and modifiedDate, I also have ...
I have two models category and inventories and they are associated. The command I used is: Category.find(query).populate('inventories',{select: ['id']}); This command returns the following result: "categories": [ { "inventories": [ { ...
I am struggling with locating model instances based on the nested address attribute in one of my models. attributes: { address: { type: 'json' } } I have attempted various queries to find model instances located in the same city: Model.find({ "a ...