Fork me on GitHub
Chris O’Donnell02:03:11

I have a reference to an enum and I'm struggling to get the :db/ident value of the enum inside a pull. Is it possible to do this, or should I just stick to the entity api?


codonnell: are you trying to get the ident for the attr's value instead of a map with {:db/ident .. :db/id ... } etc ? if so, i don't think that's possible


That ident behavior is the default behavior for the entity API. There's about equal preference in the community, and there is a corresponding split between the philosophies in pull and entity and how they return facts about entities.

Chris O’Donnell16:03:03

@bkamphaus: I'm getting an error when trying to restore the mbrainz database. After downloading it and untarring, I run bin/datomic restore-db file:datomic-mbrainz-backup-20130611 datomic: but get the error clojure.lang.ExceptionInfo: :restore/no-roots No restore points available at file:datomic-mbrainz-backup-20130611 {:uri "file:datomic-mbrainz-backup-20130611", :db/error :restore/no-roots}. Any idea what went wrong?


Try the absolute path. A lot of people had size issues with the size of that db so the examples, etc. are all now tailored for a subset (info for it documented here: ). There’s also an outstanding bug on windows where it will fail to restore unless you manually provide the t value as an argument.


you can look at the roots/ subdir of a backup to find any of those t values you could restore to if you are on windows and that’s the issue.