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

unique idents should not be indexed with {:index-all? true} #13

Open
jtmarmon opened this issue Jun 15, 2015 · 3 comments
Open

unique idents should not be indexed with {:index-all? true} #13

jtmarmon opened this issue Jun 15, 2015 · 3 comments

Comments

@jtmarmon
Copy link
Contributor

A unique identity attribute is always indexed by value, in order to support uniqueness checks. Specifying :db/index true is redundant and not recommended.

http://docs.datomic.com/identity.html#unique-identities

@CmdrDats
Copy link
Contributor

@jtmarmon Thanks - but datomic-schema doesn't automatically add the indexed property unless you've asked specifically to add it or you've said you want every attribute indexed, so I don't really see how this is relevant?

@jtmarmon
Copy link
Contributor Author

I'm merely suggesting that there should be an extra option or something...the point of index-all? is to follow datomic guidelines that you should index everything. Well part of those guidelines is to not index :unique-identity since it's already indexed

@CmdrDats
Copy link
Contributor

Ah, I see - it's particularly around index-all, sorry - I misunderstood the intent of the task. I'll happily accept a PR to improve this.

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

2 participants