   (apply update-comp-tag-disp-ctx (d/tempid :db.part/user) :comp-tag-disp-ctx/name name))
 
 (def transact-perf-asmt
+  #_
   (transact-entity-fn [:perf-asmt/id-sk
                        :perf-asmt/name
                        :perf-asmt/version

;; Creation/update functions

;; TODO: schematode may have a thing that does this?
(defn with-constraints
  "transact with schematode constraints"
  [conn tx]
  (d/transact conn [[:schematode-tx [tx]]]))

(defn- transact-entity-fn
  [fields]
  (fn [conn eid & {:as updates}]
    (with-constraints conn (merge {:db/id eid} (select-keys updates fields)))))

(defn- update-entity-fn
  [updatable-fields transact-fn]
  (fn [conn & {:keys {eid} :as entity}]
    (apply transact-fn conn eid (select-keys entity updatable-fields))))

(def transact-competency
  ^{:private true}
  (transact-entity-fn [:comp/id-sk :comp/name :comp/description :comp/version :comp/status :comp/tags]))

;; TODO: can we update name-version?
;; TODO: this?
(def update-competency
  (update-entity-fn [:comp/description :comp/status] transact-competency))

;; TODO: or this?   -- this seems better from a readability standpoint
(defn update-competency2
  [conn & {:keys {eid} :as entity}]
  (let [updatable-fields [:comp/description :comp/status]]
    (apply transact-competency conn eid (select-keys entity updateable-fields))))

(defn create-competency
  "Create a new competency"

              id-sk))

(defn get-competency-by-name-version
  "Get competency by name+verion"
  [conn name version]
  (get-entity conn '[:find ?e
                     :in $ ?name ?version
