Blog/Why we didn't choose Exposed

Why we didn't choose Exposed

We build in Kotlin, so we owe an answer to a fair question. JetBrains already makes JetBrains Exposed, a strong, well-liked Kotlin SQL library for exactly our language. Why did we not build ST/ORM on top of it?

April 14, 2026Comparison4 min read

A question of boundaries

Our reasons have less to do with missing features than with where each library draws its boundary. Exposed gives you a Kotlin way to model and work with a database. ST/ORM starts from the belief that the data model belongs in the database, and concentrates on making that model available to application logic as plain, typed data. The same idea is behind why we built ST/ORM in the first place.

Exposed starts from the database

The two projects start from different first principles, and the ones Exposed chose suit the Kotlin story very well. Its center of gravity is the database itself. With the table DSL you describe a whole schema in Kotlin, with its tables, columns, keys and constraints, and you can drive the database from that description. Exposed is excellent at modeling a database this way, and if what you want is to describe and command a database in idiomatic Kotlin, it is a superb answer.

Exposed aims to be the Kotlin way to talk to SQL

That strength comes with a wide aim. Exposed sets out to be the complete Kotlin way to talk to a database, and the part it optimizes for is defining the schema. Writing an application against that schema day to day is a slightly different concern, and there the fit is looser. The DSL gives you type-safe queries but hands the results back as rows, which you then map into your own types. Over a handful of tables that is fine. Over a few hundred, it adds up to a lot of mapping to write and keep correct by hand.

The DAO API solves part of the mapping problem

Exposed does have an answer for the mapping. Its DAO API turns each row into an entity object you work with directly, and for many projects that closes the gap well. What gave us pause was the kind of abstraction it is. A repository abstracts access: it groups the operations for reading and writing a row and hands the row back as the same plain record it always was. The DAO abstracts representation. On top of the table it puts a second version of your data, a mutable, transaction-bound entity with lazily loaded references and updates that flush on commit. That is a parallel model to keep in sync, and it carries the managed lifecycle we had just spent a rebuild moving away from. Both abstractions are useful, but the DAO is the one that gives you another model of your data to learn.

ST/ORM draws the boundary differently

We come at this from the other side, though not quite in the way that might sound. Exposed is schema-first, while ST/ORM respects the database and faces the application. On the thing that matters most we agree with Exposed: the real data model lives in the database, not in your code. Where we part ways is that Exposed also gives you the tools to define that model from Kotlin, and we did not want to.

We take the schema as the database hands it to us and put our effort into a narrower goal, which is making that model available to application code as plain, typed records. These are the same values rather than managed objects that shape the rest of ST/ORM, and the choice follows from our first-principles approach to the data layer. Exposed lets you model the database beautifully before you reach for the data. We leave the schema to the database and only reach for the data, as plain records that go into real SQL and come back unchanged.

Kotlin-first, enterprise JVM second

We are glad to see Exposed, after many years, fully embraced by JetBrains, with a 1.0 release and real investment behind it. It is their Kotlin-native data library, and it sits close to where JetBrains is heading, which is Kotlin everywhere, multiplatform included. ST/ORM is aimed at a different room. It lives in the enterprise JVM, where Kotlin is a first-class citizen but not the only one. It became Kotlin-first for a plain reason: Java is still catching up in a few places that matter to an API shaped like this one, and we want the Java variant to feel natural in Java too.

A fit decision, not a verdict

None of this is a case against Exposed. We admire it enough that our own transactions follow the same programmatic, coroutine-friendly shape JetBrains Exposed made popular. Exposed is excellent when you want to model and command a database in Kotlin, and ST/ORM optimizes for a different boundary. Once you commit to that boundary, you stop looking for a library to adopt, because it is probably something you will have to build yourself.