@ho0man find ids using query or index, then retract
(let [source-eid (:db/id (d/entity db [:source/id source-id]))
flow-eids (map :e (d/datoms db :avet :source-flow/source source-eid))]
(d/transact! conn (for [flow-eid flow-eids] [:db.fn/retractEntity flow-eid])))
@dimovich normally you’d use OR but we don’t support it in DataScript yet
Thanks a lot