Fork me on GitHub
#datomic
<
2017-01-29
>
ezmiller7710:01:41

@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})))

ezmiller7710:01:40

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]"

pesterhazy10:01:27

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

pesterhazy10:01:20

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

pesterhazy10:01:53

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

pesterhazy11:01:04

it would be nice if that was documented here: http://docs.datomic.com/clojure-client/index.html

ezmiller7713:01:40

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

ezmiller7714:01:15

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.

ezmiller7714:01:58

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.

nooga16:01:55

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

nooga16:01:19

I see that there’s datomic starter license now

nooga16:01:14

> 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?

ezmiller7719:01:19

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