Why the error
`Error: The hook 'orm' is taking too long to load.`
It occurs very often when sails is lifting? Even orm timeout already set to 100000, it still occur sometimes (not always). Usually it happen after PC has been restarted and sails…
Selection of Parent with one of the Child isn't working in Sails JS. Rather, my select statement's aren't yielding result. So, looking for best answer
Model 1: User
module.exports = {
attributes: {
name:{
type:"string",
…
I have two models, items and order, that have a many-to-many association. What I've been trying to do for the past 5 hours is figure out a way to add multiple items objects to an order including duplicates.
If the items are unique it works…
I am new to Sails and Mongo Db. Currently I am trying to implement a CRUD Function using Sails where I want to save user details in Mongo db.In the model I have the following attributes
"id":{
type:'Integer',
min:100,
…
I am trying out sailsJs with mongodb using the sails-mongo adapter.
After adding validations to a model, I get the following response when the validation fails.
Users.js Model:
module.exports = {
schema: true,
attributes: {
name: {
…
Hi i am a new bee to sails and trying to get a model api that finally gives output as follows
[
{
"icon" : [
{"name":"ico1", "ico_typ":"fb", "ico_content_URL":"someLocation"},
{"name":"ico2", "ico_typ":"tw",…
Using SailsJS, I'm trying to figure out how to use a custom Primary Key as Integer that auto increments.
For that, I passed autoPK:false, but I see that mongo still used it's 'id' field with UUID, as if Waterline is ignoring my autoPK entry.
For…
Long story short I'm creating a User model that needs to be able to have expiring subscriptions, and was wondering how to store them correctly using Sails. The kind of model I need is:
User : {
...
subscriptions : [{
artist :…
model.find({city: city, sort: 'cityname ASC'}, function(err, cityList){});
the above code giving the correct sorting list but whenever the city is in both uppercase or lowercase like Coimbatore,bangalore,Chennai it gives the output as…
Diagram:
I want to have a array with all IDs of the friend users, like this:
{
id: 1
name: 'Javi',
email: '123@gmail.com',
friends: [2]
}
{
id: 2,
name: 'User2',
email: '321@gmail.com',
friends: [1]
}
i tried with…
Sails@beta, mongodb, windows 7 32bit,
i am receiving the above error after trying to make a new user through the app. when i remove the policy isPawn from config/policies.js everything works. i don't understand what is wrong with this policy. it…
Using Sails.js version 0.10.x, assume I have a model Dog, populated as follows (writtenout in yaml format for convenience, but in my case it's actually in a mongo database.)
dogs:
- breed: "wolf"
name: "Fido"
- breed: "wolf"
name: "Roger"
- …
I have a sails app(v ~0.10.0) using sails-mongo (v 0.10.0-rc4) and i need to execute some queries in my database through migrations.
There is any support to this feature in sails?
**Error Type**
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 have a challenge from a customer. They'd like me to be able to support the creation, editing and deletion of custom fields against a Model within my application. This is so they can record any values that they see fit against a model and report…