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

With two indexes (a,b) and (a,b,c), with (a,b,c) unique, document layer allows duplicate values #222

Open
jlove-nz opened this issue Nov 10, 2019 · 0 comments

Comments

@jlove-nz
Copy link

Having a collection with two indexes:

db.getCollection("links").createIndex({ "left": 1, "right": 1 }, { })
db.getCollection("links").createIndex({ "left": 1, "right": 1, "type": 1 }, {
    "unique": true
})

created against a collection "links", on insert of values, the FDB document layer allows duplicate documents where the values of "left", "right" and "type" are duplicate.

However, deleting the first index (listing "left" and "right" without the uniqueness constraint) allows the unique index to act properly and duplicate values cannot be inserted.

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

1 participant