# Enumerated values in tuples are only eids

**URL:** <https://forum.datomic.com/t/enumerated-values-in-tuples-are-only-eids/1644>\
**Category:** Datomic Cloud\
**Created:** [October 3, 2020, 12:02pm UTC](https://forum.datomic.com/t/enumerated-values-in-tuples-are-only-eids/1644 "2020-10-03T12:02:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshkh](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/joshkh/32/355_2.png) [@joshkh](https://forum.datomic.com/u/joshkh)\
**Post date:** [October 3, 2020, 12:02pm UTC](https://forum.datomic.com/t/enumerated-values-in-tuples-are-only-eids/1644/1 "2020-10-03T12:02:19Z")

</div>

When pulling a reference to an enumerated value, the result is an entity map with the `db/id` and the `db/ident`:

```auto
{:db/ident :some/enumerated-ident
 :db/id 987}

{:db/ident :some/ref
 :db/valueType :db.type/ref
 :db/cardinality :db.cardinality/many
 :db/doc "An example of a reference attribute"}

(d/q '{:find [(pull ?n [:some/ref])]
       :in [$ ?n]}
     db 999)

=> [{:some/ref [{:db/id 987 :db/ident :some/enumerated-ident}]}]

```

This is very useful for pulling enumerated values:

> **[Data Modeling | Datomic](https://docs.datomic.com/cloud/schema/schema-modeling.html#enums)**

However, when pulling a reference to an enumerated value in a tuple attribute, the result is just an eid

```auto
{:db/ident :some/enumerated-ident
 :db/id 987}

{:db/ident :some/tuple
 :db/valueType :db.type/tuple
 :db/tupleTypes [:db.type/ref]
 :db/cardinality :db.cardinality/many
 :db/doc "An example of a tuple attribute with a reference"}

(d/q '{:find [(pull ?n [:some/tuple])]
       :in [$ ?n]}
     db 999) 

=> [{:some/tuple [987]}]

```

Which is not so useful for pulling enumerated values. To get the ident, one must unify on the `eid` in the constraints, ruling out any base entities that might not have a value in `:some/tuple` (unlike the first example).
