     (unparse fmtr timestamp)))
 
 (defn- fmt-time [file-meta]
-  (assoc file-meta :time (format-timestamp (:time file-meta))))
+  (assoc file-meta :time
+         (. java.sql.Timestamp valueOf (format-timestamp (:time file-meta)))))
 
 (defn clean-sources []
   (delete sources

      (insert table
              (values {id-key id :sources_id fid})))))

; kdb/transaction will create a closure of our parameters,
; so we can't pass in the matrix seq w/o blowing the heap. We
; pass in a function to return the seq, instead.

; XXX take feature data as well
(defn load-exp [files metadata matrix-fn features]
  (kdb/transaction
    (let [matrix (matrix-fn)
          exp (merge-m-ent experiments-meta metadata)]
      (clear-by-exp exp)
      (load-related-sources
        experiment_sources :experiments_id exp (map fmt-time files))
      (load-exp-samples exp (:samples (meta matrix)))
      (load-exp-matrix exp matrix))))

; XXX factor out common parts with merge, above?
(defn del-exp [file]

; Probemap declarations
;

(declare probmaps probemap_probes probemap_positions probemap_genes)
(defentity probemap_sources)

(defentity probemaps
  (has-many probemap_probes)
  (many-to-many sources :probemap_sources))

(defentity probemap_probes
  (belongs-to probemaps)
