How to create a Datomic partition without using db.part -


in official docs datomic (http://docs.datomic.com/schema.html) under heading 'creating new partitions' says new partition (communities) can created this:

{:db/id #db/id[:db.part/db]  :db/ident :communities} 

here ':communities' not written 'db.part/communities'

i can not install new partition way. me has leading 'db.part/'. documentation wrong, or not seeing bigger picture?

if read further in documentation, you'll see you're missing datom required transaction (labeled "here complete transaction..."). datom (with user assigned tempid -1 optional):

[:db/add :db.part/db :db.install/partition #db/id[:db.part/db -1]] 

anything transacted tempid resolves system partition (:db.part/db) must include datom marking installation, :db.install/partition , :db.install/attribute (the reverse ref version attribute included in map more common).

transacting full example docs works fine:

(def tx [{:db/id #db/id[:db.part/db -1]           :db/ident :communities}          [:db/add :db.part/db :db.install/partition #db/id[:db.part/db -1]]]) @(d/transact conn tx) ;; returns successful tx map 

Comments