Closed jjttjj closed 1 year ago
The datomic docs suggest any entity identifier is allowed for the entity argument passed to get-else. However in datascript an exception is thrown when a lookup vector is used.
get-else
(d/q '[:find ?maybe :in $ ?lookup :where [(get-else $ ?lookup ::number 0) ?maybe]] (d/db-with (d/empty-db {::id {:db/unique :db.unique/identity}}) [{::id 123}]) [::id 123])
Results in:
ClassCastException class clojure.lang.PersistentVector cannot be cast to class java.lang.Number
The datomic docs suggest any entity identifier is allowed for the entity argument passed to
get-else
. However in datascript an exception is thrown when a lookup vector is used.Results in: