ORM Compatibility

One of our goals over the next few months is to increase the number of ways which developers can interact with CockroachDB. A major step here will be to build up the number of ORMs which can be run against a CockroachDB cluster. I’m starting to compile a list of ORMs to focus compatibility efforts on, and wanted to get people’s opinions on which ORMs you think we should prioritize. Currently, I have the following ORMs on the radar:

Hibernate - Java
Sequelize - JavaScript (node.js)
ActiveRecord - Ruby
Django - Python
SQLAlchemy - Python
Entity Framework - .NET
Diesel - Rust

Any additions to this list, along with an indication of how we should prioritize them, would be appreciated. Thanks.

Originally posted: https://groups.google.com/forum/#!topic/cockroach-db/chtZ7FC-W-w
Repository: https://github.com/cockroachdb/examples-orms
Plan: https://docs.google.com/spreadsheets/d/17A0EflPqI9yhargK0n4tSw2WogQuVc5YeK-VFmKvXHM/edit

I would vote for “ActiveRecord - Ruby” first and “Sequel - Ruby” second.

While not exactly an ORM, I would be interested in any integration of Flatbuffers with Cockroach. Flatbuffers are an efficient, cross-language mechanism for serialisation and are schema-based.

We’ve had someone ask for EclipseLink (JDBC based) too.

i have used sequelize with mariadb and it works great - that one gets my vote.

I would like to see support for ruby Sequel as well.

I’ve already created quick and dirty cockroachdb adapter for Sequel and it works. It is mainly introspection stuff that is missing and knowing what params to provide in the connection uri.

We need Spring Data JPA compatibility.

Is it possible to use Spring Data JPA?

I know I’m late to the party, but I’d like to toss Flyway support into the mix for consideration. It’s not an ORM per se, but it is useful tool for managing schema migrations, particularly for projects written in languages lacking a good built-in migration story (like what ActiveRecord provides).

Any updates on the process?

Hi @aemadrid,

We’re working hard on compatibility for several popular ORMs: Sequelize, Hibernate, and ActiveRecord. We aim to have support for these three by the end of Q1. You can track our progress on GitHub by following the orm-support tag: https://github.com/cockroachdb/cockroach/issues?q=is%3Aissue+is%3Aopen+label%3Aorm-support


We’re happy to report that we can now recommend GORM for Go, SQLAlchemy for Python, and Hibernate for Java. We have tutorials demonstrating basic usage of these ORMs with CockroachDB:

If you have problems using any of these with CockroachDB, please help us out and open an issue with details.

Next up: Active Record (Ruby) and Sequelize (Node.js). We’re making good progress.

Hi @gjmveloso,

This is supported already :wink:

For now, you will have to use my fork of Postgrex : https://github.com/jumpn/postgrex
And for testing, you will need to include a dedicated CockroachDB sandbox implementation: https://github.com/jumpn/cockroachdb_sandbox

If you have any question, please let me know.

Just tested CRDB with PHP, Symfony & Doctrine2, there are some information_schema issues at first glance. Would be awesome to get support for Doctrine2 as well!

1 Like

@rtbvro, could you open an issue with Doctrine2’s failing query? We have a standing issue to implement the rest of information_schema, but it’s a rather hefty task. Knowing what’s actually required for ORM support really helps us prioritize.

@benesch https://github.com/radutopala/cockroach-app/issues … I’ve added 2 initial issues here.

Thanks! I filed matching CockroachDB issues and commented on your Github.

I would vote for Django - python


vote for Ecto / Elixir