You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, this doesn't work -- I've boiled it down to being because xforms don't get called for reference attributes:
(let [res (d/with (d/empty-db {:a-ref-attr {:db/valueType:db.type/ref}})
[[:db/add-1:db/ident:a-tag]
[:db/add-2:a-ref-attr-1]])
ent-id (get-in res [:tempids-2])
db (:db-after res)]
(d/pull db [[:a-ref-attr:xform (fn [%] (println"xform was called") 42)]] ent-id))
;;; [SILENCE -- NO PRINT, and value is not 42 but #db{:id 1}]
=> {:a-ref-attr #:db{:id1}}
The text was updated successfully, but these errors were encountered:
mortenschioler
changed the title
:form is not called on ref attributes:xform is not called on ref attributes
Oct 11, 2023
Wow, cool @tonsky! 💯 Thank you so much for your work on DataScript. Am using it in a POC with re-frame, after reading Into The Tar Pit, and am loving it.
I want to dereference tag enumeration entities as part of a pull expression. For example:
Unfortunately, this doesn't work -- I've boiled it down to being because xforms don't get called for reference attributes:
The text was updated successfully, but these errors were encountered: