# Tuple with single item fails transaction

**URL:** <https://forum.datomic.com/t/tuple-with-single-item-fails-transaction/1690>\
**Category:** Datomic Pro\
**Created:** [November 18, 2020, 7:58am UTC](https://forum.datomic.com/t/tuple-with-single-item-fails-transaction/1690 "2020-11-18T07:58:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhinav](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@abhinav](https://forum.datomic.com/u/abhinav)\
**Post date:** [November 18, 2020, 7:58am UTC](https://forum.datomic.com/t/tuple-with-single-item-fails-transaction/1690/1 "2020-11-18T07:58:01Z")

</div>

schema

> {:db/ident :ns/things,  
> :db/valueType :db.type/tuple,  
> :db/tupleType :db.type/string,  
> :db/cardinality :db.cardinality/one}

Fails when a single value is given. (works when multiple vals in vector i.e [“s” “k”])

> (d/transact conn [{:db/id “x” :ns/things [“s”]}])

From docs `Homogeneous tuples provide variable length composites ..`  
How is this variable-length when length can’t be one?

---

<div class="post-metadata">

**Author:** ![jaret](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/jaret/32/45_2.png) [@jaret](https://forum.datomic.com/u/jaret)\
**Post date:** [November 18, 2020, 5:31pm UTC](https://forum.datomic.com/t/tuple-with-single-item-fails-transaction/1690/2 "2020-11-18T17:31:28Z")

</div>

Hi @abhinav,

[https://docs.datomic.com/on-prem/schema.html#tuples](https://docs.datomic.com/on-prem/schema.html#tuples)

> A tuple is a collection of 2-8 scalar values, represented in memory as a Clojure vector. There are three kinds of tuples:

I can see why this may be confusing as [Homogeneous variable length tuples](https://docs.datomic.com/on-prem/schema.html#homogeneous-tuples) does not explicitly mention the 2-8 scalar value types, but all tuples are a collection of 2-8 scalar values, including Homogeneous tuples. I will correct the docs to explicitly say that. You must have multiple items in the vector 2 or greater.

Additionally you may be interested in knowing that, `nil` is a legal value for any slot in a tuple. This facilitates using tuples in range searches, where `nil` sorts lowest.
