   "associate a new rhs with existing index"
   (assoc-in indeces [i fk (rhs-pk-key rhs)] rhs))
 
+(defn- rhs-dissoc [indeces i rhs-pk-key fk rhs]
+  "dissociate an rhs from existing index"
+  (update-in indeces [i fk (rhs-pk-key rhs)] (fn [_] nil)))
+
 (deftest test-rhs-access
   (let [before [[] {}]
 	after  [[] {String {3 "xxx"}}]]
     (is (= after (rhs-assoc before 1 count String "xxx")))
-    (is (= '(("xxx")) (rhses-get (rest after) [first] [String])))))
+    (is (= '(("xxx")) (rhses-get (rest after) [first] [String])))
+    (is (= [[] {String {3 nil}}] (rhs-dissoc after 1 count String "xxx")))))
 
 ;;--------------------------------------------------------------------------------
 ;; this layer encapsulates access to both lhs and rhs at the same time...

    [new-indeces (fn [_] (on-upserts joined-model joins))]
    ))

;;; TODO
(defn- rhs-delete [old-indeces i ks v join-fn])
(defn- rhs-upserts [old-indeces i ks vs join-fn])
(defn- rhs-deletes [old-indeces i ks vs join-fn])


	   }
	   (data joined-model)))

    ;; join - delete rhs - b2
    (on-delete bs b2)
    (is (= [[{:b {:a1 a1v1}}{:c {:a1 a1v1}}]
	    {:b {:b1 b1v1 :b2 nil}} {:c {:c1 c1v1 :c2 c2}}] (data join)))
    (is (= {
	   [:a1 :b1 :c1] (->ABC [:a1 :b1 :c1] [1 1 1] "b1v1-data" "c1v1-data")
	   [:a1 :b1 :c2] (->ABC [:a1 :b1 :c2] [1 1 0] "b1v1-data" "c2-data")
	   }
	   (data joined-model)))

    ;; TODO:
    ;;  amend in/out
