I think I found a bug:
In the docstring of datalevin.core/entity it says:
>
If entity does not exist, `nil` is returned:
>
> (entity db 100500) ; => nil
however, if I try to call e.g. (d/entity conn 999999999999999999) I just get back
> {:db/id 999999999999999999}How do get data from an entity? I’m trying to encode it as transit and it isn’t working since it’s its own type. Clojure.datafy isn’t implemented for Datalevin’s Entity type.
datafy is already implemented on pulled entities. Please see datalevin.test.datafy. Let me know what else is on your mind
On a second look, I would rather change the doc string, as I found that there's actually a test to ensure the above behavior. Also, there will be problem with remote entity. So I will keep the behavior and change the doc string instead.
I don’t quite understand why/how I can touch an entity and it prints fine in the REPL, but this data structure somehow isn’t available to me ?
Can you transfer it to a standard map with (into {} the-entity)?
Thanks for listening, @huahaiy !