 
 (defn get-logic-db []
   (->> (get-facts)
-       (into [] (map (fn [{:keys [e a v t]}]
-                       [fact e a v t])))
+       project-facts
+       #_(into [] (map (fn [{:keys [e a v t]}]
+                         [fact e a v t])))
+       (into [] (map #(vec (cons fact %))))
        (apply lp/db)))
 
 

      (l/== q [e2 a2 v2 t2])))
#_(get-entity 1)

#_(def facts
    (lp/db
     [fact 10 :user/name "walter" 1]

     [fact 20 :comment/text "comment walter 1" 2]
     [fact 20 :comment/date #inst"2017-01-01" 2]
     [fact 20 :comment/author 10 2]

     [fact 21 :comment/text "comment walter 2" 3]
     [fact 21 :comment/date #inst"2017-01-02" 3]
     [fact 21 :comment/author 10 3]))
#_(lp/with-db (get-logic-db)
    (l/run* [q]
      (l/fresh [eu vu

  (:require [clojure.edn :as edn]
            [clojure.core.logic :as l]
            [clojure.core.logic.pldb :as lp]
            [clojure.core.logic.fd :as lfd]
            [korma.core :as db]
            [eventsourcing.db :as evdb]))

