It seems d/with should work inside tx fn, but I’m getting an exception whenever I try it in dev-local:
datomic.client.api/with api.clj: 363
datomic.client.api.protocols/fn/G protocols.clj: 126
datomic.core.local-db/fn local_db.clj: 67
datomic.core.db.Db/with db.clj: 2164
datomic.core.db/with-tx db.clj: 3369
datomic.core.db/add-ensured-data db.clj: 3352
datomic.core.db.Db/addData db.clj: 2322
clojure.core/conj core.clj: 85
...
datomic.dev-local.btindex.BTIndex/cons btindex.clj: 281
...
datomic.dev-local.local-log.LocalLog/valAt local_log.clj: 56
datomic.dev-local.tx/datom-lookup-valfn tx.clj: 397
java.lang.ClassCastException: class datomic.core.db.Datum cannot be cast to class
java.lang.Number (datomic.core.db.Datum is in unnamed module of loader 'app';
java.lang.Number is in module java.base of loader 'bootstrap')
Should d/with in tx fn be supported in dev-local?