Fork me on GitHub
#datascript
<
2017-05-09
>
misha10:05:39

@tonsky should strings work as temp ids or not?

(ds/transact!
  (ds/create-conn {:foo/bar {:db/valueType :db.type/ref}})
  [{:db/id "foo"}
   {:foo/bar {:db/id "foo"}}])
ExceptionInfo Expected number or lookup ref for :db/id, got "foo"  clojure.core/ex-info (core.clj:4725)
;; same for:
{:foo/bar [:db/id "foo"]}
{:foo/bar "foo"}
;; [datascript "0.16.1"]

misha10:05:10

ah, even following does not work, so I presume they should not

(ds/transact!  (ds/create-conn)  [{:db/id "foo"}])
harold