omcljs / om

ClojureScript interface to Facebook's React
6.65k stars 364 forks source link

Fix OM 877 - Fix db->tree recursive join query on vector value #878

Open bnoguchi opened 7 years ago

bnoguchi commented 7 years ago

See GH-877:

In JVM clojure, the following will fail:

(let [query [{:tree [:id
                         :value
                         {:children '...}]}]
          state {:tree {:id 0 :value 42
                        :children [{:id 1 :value 43
                                    :children [{:id 2 :value 99
                                                :children []}]}
                                   {:id 3 :value 101
                                    :children []}]}}]
      (is (= state
             (om/db->tree query state state))))

with exception

java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol
swannodette commented 7 years ago

@bnoguchi thanks, have you submitted your Om Contributor Agreement? If not I can send it to your preferred email, thanks!

bnoguchi commented 7 years ago

@swannodette I haven't signed the Om Contributor Agreement, but happy to review and sign today. I'll DM you on Slack with my preferred email. Thanks, and great work on all the new goodies in Clojurescript!