Fork me on GitHub

@pesterhazy, sorry typo there. the problem I was having is that the syntax i was using there was in edn; in clojure, it needs to be different. so i ended up doing this in the repl:

(def id (datomic.api/tempid :db.part/db))

(def tx [[:db/add id :db/ident :arb/title]
         [:db/add id :db/unique :db.unique/identity]
         [:db/add id :db/valueType :db.type/string]
         [:db/add id :db/cardinality :db.cardinality/one]
         [:db/add id :db/fulltext true]
         [:db/add id :db/index true]
         [:db/add :db.part/db :db.install/attribute id]])

(pprint (<!! (client/transact conn {:tx-data tx})))


I ended up getting the same error as before, which I just can’t make sense of: > Unable to resolve entity: {:idx -1000000, :part :db.part/db} in datom [{:idx -1000000, :part :db.part/db} :db/ident :arb/title]"


@ezmiller77 hm that's strange, it works for me using d/transact


the problem is you're using the client api with regular tempids


if you use the regular peer api, it should work as expected


it would be nice if that was documented here:


okay, i got the impression at some point that the client peer was the more basic/easier-to-use.


Oh yes it was this paragraph: > There are two ways to consume Datomic: with an in-process peer library, or with a client library. If you are trying Datomic for the first time, we recommend that you begin with a client library. When you are ready to plan a system, you can return to this page for guidance on whether to use peers, clients, or both.


Yep @pesterhazy that was the key! I just excluded these lines: :db/id #db/id[:db.part/db] and :db.install/_attribute :db.part/db} b/c apparently tempids re also optional.


I’m trying to assess if using datomic for an open source IoT hub project makes sense


I see that there’s datomic starter license now


> The Datomic Starter license is perpetual, but is limited to 1 year of maintenance and updates does that mean that after a year, I won’t be able to upgrade to a newer version any more?


Is it possible to describe a schema entity that is both stand-alone and embedded, i.e. a component and also not a component?