Fork me on GitHub
Ivar Refsdal07:04:24

@currentoor I had the same issue, and while I don't recall the exact details of it, I solved it using clojure.walk/prewalk and checking for java.util.List inside my db fn:

  (fn [e] (cond (and (instance? java.util.List e) (not (vector? e))) (vec e)
                :else e))

Ivar Refsdal08:04:05

@currentoor I believe I've also encountered java.util.Arrays$ArrayList, at least that is what my tests are using to reproduce the behaviour encountered in production. I'm using e.g. (java.util.Arrays/asList (into-array [1 2 3])) in my tests to test the convert function


I have a service that I use, and I want to store it's response (EDN) under a particular key in Datomic. AFAIK Datomic doesn't currently support this document like storage? How should I do something like this? Store them externally, and put their IDs in Datomic?


Yes, I usually store blobs like these in S3 and the key in Datomic.


The API response is highly dynamic, doesn't use namespaced keywords, and most of the time, I don't foresee needing to use Datalog into it.


I'm fine with it being an opaque value.


you can store it as a string but datomic has performance issues with big strings >1Kb