Open sayjeyhi opened 5 years ago
Hi @jafar-rezaei! It looks like you missed a step or two when you created your issue. Please edit your comment (use the pencil icon at the top-right corner of the comment box) and fix the following:
As soon as those items are rectified, post a new comment (e.g. “Ok, fixed!”) below and we'll take a look. Thanks!
*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact inquiries@sailsjs.com
Ok, fixed!
@jafar-rezaei 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.
It was because of models config migrate
, and mongodb
user access to create indexes (we add role to readWrite
should create dbOwner
) , after set migrate:'alter'
and set user access the error fixed.
@jafar-rezaei just a heads up, we're attempting to consolidate issues into one place now, so I've transferred this one into the sails repo. Are you still experiencing this issue with uniqueness checks, or did those changes solve it?
@rachaelshaw thanks , actually I still have it , it did not create index
on mongodb
when we use mongo authentication
, without authentication it seems to works fine ... 😞
I have the same behaviour on with sails-mysql
. Validation is not performed
@german970814 I disappointed from auto creation unique
index and add it on app bootstrap
Hi @german970814 and @jafar-rezaei I want to look into this issue some more. Can you both please provide your Socket and hook version information so that I can start gathering enough info to try to reproduce the issue.
My dependences:
"@sailshq/lodash": "3.10.3",
"bcryptjs": "2.4.3",
"lodash": "4.17.11",
"sails": "1.1.0",
"sails-hook-orm": "2.1.1",
"sails-hook-sockets": "1.5.5",
"sails-mysql": "1.0.1"
I'm getting the issue on action validation
I did some more digging around and found some information that we may have over looked.
As the Docs say: setting unique: true
is not really a validation it is a "database-level constraint."
Please read more of this section of the docs for an example and further explanation.
Waterline version: v0.13 Node version: 10.0.7 NPM version:6.1.0 Operating system: window8
I am using sails v1.2.1 with waterline , with
sails-mongo
and set an attributeunique
but I got multiple rows !