Open den1k opened 3 years ago
The common use case where this matters anytime one wants to run a pull query on one database and transact the result into another. In my case I have a backend and frontend DataScript DB. Based on the route the backend runs d/pull
and sends the result to the frontend to be transacted. Since the pull result contains both forward and backward refs, this fails.
Looks like a valid use-case, I’ll look into it, thank you!
In a transaction where a map has refs and reverse-ref attributes, the ref attributes are thrown away.
This works:
This fails for
:foo/relations [{:foo/id "foo3"}]
but works for the reverse:foo/_relations
:Looking at the indexes of either DB we see that the relations and datoms are missing in
db-with-foo-backwards
: