(defprotocol AProtocol
  (foo [this]))

(extend-protocol AProtocol
  Object
  (foo [x] (println "object") x)
  MyEntity
  (foo [x] (println "entity") x))

(foo (MyEntity. 1 2 3)) => entity
(foo (first (ds/query MyEntity))) => object

(class (first (ds/query MyEntity))) => my.ns.MyEntity

Add a code snippet to your website: www.paste.org