-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userError: The model Action
defined a primary key of id
that has an invalid type. Valid primary key types are number
and string
#4614
Comments
@ganeshkbhat 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. |
Help requested, and any help is welcome to get
|
I have raised a stackoverflow question to no help - https://stackoverflow.com/questions/53587393/sails-min-max-minlength-maxlength-for-number-and-string-types-gives-usererror Any help is welcome. |
@ganeshkbhat looks like you're using Waterline standalone, but if you have a chance would you try reproducing this in a new Sails app and link to the repo? (Might help us better understand what's going on) |
Hey @ganeshkbhat , we're moving all the Waterline issues to the main Sails repo (balderdashy/sails) for closer monitoring and greater exposure to the community. I see the last update on this one was reproducing the issue in a repo. We appreciate you taking the time to provide all you have so far, feel free to let us know how this one is going. Thanks. |
Waterline version: "waterline": "^0.13.5",
Node version: 10.7.0
NPM version: 6.1.0
Operating system: Ubuntu 18.x
I have read through the issue and have tried adding autoPK: true but seems like I am unable to use it. https://github.com/balderdashy/waterline/issues/301 It fails asking for Primary key to be defined.
Error when no Primary key is defined.
{ userError: Could not find a primary key attribute on the model
Action. All models must contain an attribute that acts as the primary key and is guaranteed to be unique.
Error when Primary Key is defined.
userError: The model 'Action' defined a primary key of 'id' that has an invalid type. Valid primary key types are 'number' and 'string'
Both way this fails. I am using sails-mongo as the adapter.
The text was updated successfully, but these errors were encountered: