Problem
I use a pattern to filter out such an item from :user/items, this item has a field :store/identity "id2" in :reward/store, when I pull the field item/expired-at of the same level, I got the wrong result, in the following cases, ?expired-at should be 200.
((query '{:user/name "foo"
:user/items [{:reward/store {:store/identity "id2"
:store/description ?desc}
:item/expired-at ?expired-at}]})
{:user/name "foo"
:user/items [{:reward/store {:store/identity "id1"
:store/description "description"}
:item/expired-at 100}
{:reward/store {:store/identity "id2"
:store/description "descriptio2"}
:item/expired-at 200}]})
;; =>
{?desc "descriptio2"
&? #:user{:items [#:item{:expired-at 100}
nil]}}
Suggestion
There should be an association between named bindings.
Problem
I use a pattern to filter out such an
itemfrom:user/items, thisitemhas a field:store/identity "id2"in:reward/store, when I pull the fielditem/expired-atof the same level, I got the wrong result, in the following cases,?expired-atshould be 200.Suggestion
There should be an association between named bindings.