# Type difference of query result between local and ion

**URL:** <https://forum.datomic.com/t/type-difference-of-query-result-between-local-and-ion/919>\
**Category:** Troubleshooting\
**Created:** [April 10, 2019, 12:52pm UTC](https://forum.datomic.com/t/type-difference-of-query-result-between-local-and-ion/919 "2019-04-10T12:52:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmorice](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/gmorice/32/246_2.png) [@gmorice](https://forum.datomic.com/u/gmorice)\
**Post date:** [April 10, 2019, 12:52pm UTC](https://forum.datomic.com/t/type-difference-of-query-result-between-local-and-ion/919/1 "2019-04-10T12:52:07Z")

</div>

Hi,

It seems there is a difference of the type of a query result between code executed locally in the repl and inside an ion.

The following code:

```
(defn test-datomic [_]
  (let [res (d/q '[:find ?ident
                   :where [_ :db/ident ?ident]]
                 (d/db (get-conn)))]
    (-> res type str)))

```

Returns:

- “class clojure.lang.PersistentVector” locally
- “class java.util.HashSet” when deployed as an ion

---

<div class="post-metadata">

**Author:** ![marshall](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/marshall/32/48_2.png) [@marshall](https://forum.datomic.com/u/marshall)\
**Post date:** [April 15, 2019, 1:50pm UTC](https://forum.datomic.com/t/type-difference-of-query-result-between-local-and-ion/919/2 "2019-04-15T13:50:30Z")

</div>

The differences in types observed here are similar to those observed when using a transaction function in Datomic On-Prem with a local (mem) transactor vs. a deployed remote transactor.  
Datomic doesn’t guarantee type equality between wire-serialized vs. local execution. If you need to ensure a specific type, I would recommend checking and/or coercion as appropriate.
