Skip to content
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

Can I use compound unique index in parse? #2790

Closed
jimmyzzzzzzz opened this issue Sep 27, 2016 · 1 comment
Closed

Can I use compound unique index in parse? #2790

jimmyzzzzzzz opened this issue Sep 27, 2016 · 1 comment

Comments

@jimmyzzzzzzz
Copy link

According to https://www.parse.com/questions/unique-fields--2 I thought unique key was not possible. Now I'm hosting Parse with Mongodb on my own server and I can easily create compound unique indexes in mongodb. Can I safely enable this feature in my production database?

@steven-supersolid
Copy link
Contributor

The parse question/answer is from a while ago and refers to setting a unique index via code, which is still not possible.

You can of course set unique indexes at the database level which will cause an error when updating but that should be safely caught by parse-server and returned as a parse error.

I do this in production and parse-server enforces some unique indexes on _User so it seems safe enough, but my advice is to try this in dev first for your specific use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants