Sails: Is there a reliable source for documentation?

Created on 1 Dec 2017  路  5Comments  路  Source: balderdashy/sails

Waterline version: 0.13.1-9
Node version: 8.4.0
NPM version: 5.5.1
Operating system: MacOS



I'm trying to migrate from 0.11 to 0.13 but the documentation here seems to be off. I keep getting errors about wrong types or attributes.

For example, create a new model:

"use strict";

const uuid = require("uuid");

module.exports = {
  identity: "organisation",
  migrate: "safe",
  beforeCreate: (org, next) => {
    org.id = uuid.v4();
    next();
  },
  primaryKey: 'id',
  attributes: {
    id: {
      type: "string",
      unique: true
    },
    name: {
      type: "string",
      required: true
    }
  }
};

and you'll get an error saying that: The attribute 'id' on the 'organisation' model contains invalid properties. The property 'unique' isn't a recognized property.

If you use the array type you'll get a The attribute '' on the '' model uses an invalid type - 'array'.

Using the attribute option primaryKey: true, doesn't work (I already figured out you need to add a primaryKey option to the model) but then again these things are there, in the documentation.

Is there a reliable place in which I can find the current documentation?

Most helpful comment

Please, add documentation in general. I want to use it with ExpressJS. However, I can't due to lack of documentation. I am not a pro in JS. Please, add some working examples if possible.

All 5 comments

@alterx Thanks for posting, we'll take a look as soon as possible.


For help with questions about Sails, click here. If you’re interested in hiring @sailsbot and her minions in Austin, click here.

Please, add documentation in general. I want to use it with ExpressJS. However, I can't due to lack of documentation. I am not a pro in JS. Please, add some working examples if possible.

@alterx,@sailsbot,@wulfsolter,@piyushpatel2005: Hello, I'm a repo bot-- nice to meet you!

It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message and simply close the issue if possible. On the other hand, if you are still waiting on a patch, please post a comment to keep the thread alive (with any new information you can provide).

If no further activity occurs on this thread within the next 3 days, the issue will automatically be closed.

Thanks so much for your help!

I'm getting the same error using
Waterline version: 0.13.5
Node version: 8.12.0
NPM version: 6.4.1
Operating system: macOS 10.14

Was this page helpful?
0 / 5 - 0 ratings