Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _includes/v19.2/app/hibernate-basic-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ repositories {
}

dependencies {
compile 'org.hibernate:hibernate-core:5.2.4.Final'
compile 'org.postgresql:postgresql:42.2.2.jre7'
implementation 'org.hibernate:hibernate-core:5.4.19.Final'
implementation 'org.postgresql:postgresql:42.2.14'
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<!-- Database connection settings -->
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL95Dialect</property>
<property name="hibernate.dialect">org.hibernate.dialect.CockroachDB192Dialect</property>
<property name="hibernate.connection.url"><![CDATA[jdbc:postgresql://localhost:26257/bank?ssl=true&sslmode=require&sslrootcert=certs/ca.crt&sslkey=certs/client.maxroach.key.pk8&sslcert=certs/client.maxroach.crt]]></property>
<property name="hibernate.connection.username">maxroach</property>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ repositories {
}

dependencies {
compile 'org.hibernate:hibernate-core:5.2.4.Final'
compile 'org.postgresql:postgresql:42.2.2.jre7'
implementation 'org.hibernate:hibernate-core:5.4.19.Final'
implementation 'org.postgresql:postgresql:42.2.14'
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="dialect">org.hibernate.dialect.PostgreSQL95Dialect</property>
<property name="dialect">org.hibernate.dialect.CockroachDB192Dialect</property>
<property name="connection.url">jdbc:postgresql://127.0.0.1:26257/bank?sslmode=disable</property>
<property name="connection.username">maxroach</property>

Expand Down
4 changes: 2 additions & 2 deletions _includes/v20.1/app/hibernate-basic-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ repositories {
}

dependencies {
compile 'org.hibernate:hibernate-core:5.2.4.Final'
compile 'org.postgresql:postgresql:42.2.2.jre7'
implementation 'org.hibernate:hibernate-core:5.4.19.Final'
implementation 'org.postgresql:postgresql:42.2.14'
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<!-- Database connection settings -->
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL95Dialect</property>
<property name="hibernate.dialect">org.hibernate.dialect.CockroachDB201Dialect</property>
<property name="hibernate.connection.url"><![CDATA[jdbc:postgresql://localhost:26257/bank?ssl=true&sslmode=require&sslrootcert=certs/ca.crt&sslkey=certs/client.maxroach.key.pk8&sslcert=certs/client.maxroach.crt]]></property>
<property name="hibernate.connection.username">maxroach</property>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ repositories {
}

dependencies {
compile 'org.hibernate:hibernate-core:5.2.4.Final'
compile 'org.postgresql:postgresql:42.2.2.jre7'
implementation 'org.hibernate:hibernate-core:5.4.19.Final'
implementation 'org.postgresql:postgresql:42.2.14'
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="dialect">org.hibernate.dialect.PostgreSQL95Dialect</property>
<property name="dialect">org.hibernate.dialect.CockroachDB201Dialect</property>
<property name="connection.url">jdbc:postgresql://127.0.0.1:26257/bank?sslmode=disable</property>
<property name="connection.username">maxroach</property>

Expand Down
2 changes: 1 addition & 1 deletion _includes/v20.1/misc/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you encounter problems, please [open an issue](https://github.com/cockroachdb
| Language | ORM | Recommended version | Support level |
|----------+-----+---------------------+---------------|
| Go | [GORM](build-a-go-app-with-cockroachdb-gorm.html) | [1.9.11](https://github.com/jinzhu/gorm/releases) | Full |
| Java | [Hibernate](build-a-java-app-with-cockroachdb-hibernate.html)<hr>[jOOQ](build-a-java-app-with-cockroachdb-jooq.html)<hr>[MyBatis](build-a-spring-app-with-cockroachdb-mybatis.html) | [5.4](https://hibernate.org/orm/releases/)<hr>[3.13.2](https://www.jooq.org/download/versions) (must be 3.13.0 or higher)<hr>[3.5.5 and higher](https://mybatis.org/mybatis-3/) | Full<hr>Full<hr>Full |
| Java | [Hibernate](build-a-java-app-with-cockroachdb-hibernate.html)<hr>[jOOQ](build-a-java-app-with-cockroachdb-jooq.html)<hr>[MyBatis](build-a-spring-app-with-cockroachdb-mybatis.html) | [5.4.19](https://hibernate.org/orm/releases/)<hr>[3.13.2](https://www.jooq.org/download/versions) (must be 3.13.0 or higher)<hr>[3.5.5 and higher](https://mybatis.org/mybatis-3/) | Full<hr>Full |
| Node.js | [Sequelize](build-a-nodejs-app-with-cockroachdb-sequelize.html) | [sequelize 5.21.9](https://www.npmjs.com/package/sequelize)<br>[sequelize-cockroachdb 1.1.0](https://www.npmjs.com/package/sequelize-cockroachdb) | Beta |
| Ruby | [ActiveRecord](build-a-ruby-app-with-cockroachdb-activerecord.html) | [activerecord 5.2](https://rubygems.org/gems/activerecord)<br>[activerecord-cockroachdb-adpater 5.2.0](https://rubygems.org/gems/activerecord-cockroachdb-adapter) | Full (v20.1 and later) |
| Python | [Django](build-a-python-app-with-cockroachdb-django.html)<br><br><hr>[peewee](http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#cockroach-database)<hr>[PonyORM](build-a-python-app-with-cockroachdb-pony.html)<hr>[SQLAlchemy](build-a-python-app-with-cockroachdb-sqlalchemy.html) | [Django 3.0.6](https://pypi.org/project/Django/)<br>[django-cockroachdb 3.0.1](https://pypi.org/project/django-cockroachdb/)<hr>[3.13.3](https://pypi.org/project/peewee/)<hr>[0.7.13](https://pypi.org/project/pony/)<hr>[SQLAlchemy 1.3.17](https://pypi.org/project/SQLAlchemy/)<br>[sqlalchemy-cockroachdb 1.3.0](https://pypi.org/project/sqlalchemy-cockroachdb/) | Full<br><br> <hr>Full<hr>Full<hr>Full |
Expand Down
4 changes: 2 additions & 2 deletions _includes/v20.2/app/hibernate-basic-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ repositories {
}

dependencies {
compile 'org.hibernate:hibernate-core:5.2.4.Final'
compile 'org.postgresql:postgresql:42.2.2.jre7'
implementation 'org.hibernate:hibernate-core:5.4.19.Final'
implementation 'org.postgresql:postgresql:42.2.14'
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<!-- Database connection settings -->
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL95Dialect</property>
<property name="hibernate.dialect">org.hibernate.dialect.CockroachDB201Dialect</property>
<property name="hibernate.connection.url"><![CDATA[jdbc:postgresql://localhost:26257/bank?ssl=true&sslmode=require&sslrootcert=certs/ca.crt&sslkey=certs/client.maxroach.key.pk8&sslcert=certs/client.maxroach.crt]]></property>
<property name="hibernate.connection.username">maxroach</property>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ repositories {
}

dependencies {
compile 'org.hibernate:hibernate-core:5.2.4.Final'
compile 'org.postgresql:postgresql:42.2.2.jre7'
implementation 'org.hibernate:hibernate-core:5.4.19.Final'
implementation 'org.postgresql:postgresql:42.2.14'
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="dialect">org.hibernate.dialect.PostgreSQL95Dialect</property>
<property name="dialect">org.hibernate.dialect.CockroachDB201Dialect</property>
<property name="connection.url">jdbc:postgresql://127.0.0.1:26257/bank?sslmode=disable</property>
<property name="connection.username">maxroach</property>

Expand Down
4 changes: 2 additions & 2 deletions _includes/v20.2/misc/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you encounter problems, please [open an issue](https://github.com/cockroachdb
| C++ | [libpqxx](build-a-c++-app-with-cockroachdb.html) | [7.1.1](https://github.com/jtv/libpqxx/releases) (Windows)<br>[4.0.1](https://github.com/jtv/libpqxx/releases) or higher (macOS) | Beta |
| C# (.NET) | [Npgsql](build-a-csharp-app-with-cockroachdb.html) | [4.1.3.1](https://www.nuget.org/packages/Npgsql/) | Beta |
| Clojure | [java.jdbc](build-a-clojure-app-with-cockroachdb.html) | [0.7.11](https://search.maven.org/search?q=g:org.clojure%20AND%20a:java.jdbc) | Beta |
| Go | [pgx](https://godoc.org/github.com/jackc/pgx)<hr>[pq](build-a-go-app-with-cockroachdb.html) | [4.6.0](https://github.com/jackc/pgx/releases)<hr>[1.5.2](https://github.com/lib/pq/releases) | Full<hr>Full |
| Go | [pgx](build-a-go-app-with-cockroachdb.html)<hr>[pq](build-a-go-app-with-cockroachdb-pq.html) | [4.6.0](https://github.com/jackc/pgx/releases)<hr>[1.5.2](https://github.com/lib/pq/releases) | Full<hr>Full |
| Java | [JDBC](build-a-java-app-with-cockroachdb.html) | [42.2.12](https://jdbc.postgresql.org/download.html#current) | Full |
| Node.js | [pg](build-a-nodejs-app-with-cockroachdb.html) | [8.2.1](https://www.npmjs.com/package/pg) | Beta |
| PHP | [php-pgsql](build-a-php-app-with-cockroachdb.html) | [PHP 7.4.6](https://www.php.net/downloads) | Beta |
Expand All @@ -28,7 +28,7 @@ If you encounter problems, please [open an issue](https://github.com/cockroachdb
| Language | ORM | Recommended version | Support level |
|----------+-----+---------------------+---------------|
| Go | [GORM](build-a-go-app-with-cockroachdb-gorm.html) | [1.9.11](https://github.com/jinzhu/gorm/releases) | Full |
| Java | [Hibernate](build-a-java-app-with-cockroachdb-hibernate.html)<hr>[jOOQ](build-a-java-app-with-cockroachdb-jooq.html)<hr>[MyBatis](build-a-spring-app-with-cockroachdb-mybatis.html) | [5.4](https://hibernate.org/orm/releases/)<hr>[3.13.2](https://www.jooq.org/download/versions) (must be 3.13.0 or higher)<hr>[3.5.5 and higher](https://mybatis.org/mybatis-3/) | Full<hr>Full<hr>Full |
| Java | [Hibernate](build-a-java-app-with-cockroachdb-hibernate.html)<hr>[jOOQ](build-a-java-app-with-cockroachdb-jooq.html)<hr>[MyBatis](build-a-spring-app-with-cockroachdb-mybatis.html) | [5.4.19](https://hibernate.org/orm/releases/)<hr>[3.13.2](https://www.jooq.org/download/versions) (must be 3.13.0 or higher)<hr>[3.5.5 and higher](https://mybatis.org/mybatis-3/) | Full<hr>Full |
| Node.js | [Sequelize](build-a-nodejs-app-with-cockroachdb-sequelize.html) | [sequelize 5.21.9](https://www.npmjs.com/package/sequelize)<br>[sequelize-cockroachdb 1.1.0](https://www.npmjs.com/package/sequelize-cockroachdb) | Beta |
| Ruby | [ActiveRecord](build-a-ruby-app-with-cockroachdb-activerecord.html) | [activerecord 5.2](https://rubygems.org/gems/activerecord)<br>[activerecord-cockroachdb-adpater 5.2.0](https://rubygems.org/gems/activerecord-cockroachdb-adapter) | Full |
| Python | [Django](build-a-python-app-with-cockroachdb-django.html)<br><br><hr>[peewee](http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#cockroach-database)<hr>[PonyORM](build-a-python-app-with-cockroachdb-pony.html)<hr>[SQLAlchemy](build-a-python-app-with-cockroachdb-sqlalchemy.html) | [Django 3.0.6](https://pypi.org/project/Django/)<br>[django-cockroachdb 3.0.1](https://pypi.org/project/django-cockroachdb/)<hr>[3.13.3](https://pypi.org/project/peewee/)<hr>[0.7.13](https://pypi.org/project/pony/)<hr>[SQLAlchemy 1.3.17](https://pypi.org/project/SQLAlchemy/)<br>[sqlalchemy-cockroachdb 1.3.0](https://pypi.org/project/sqlalchemy-cockroachdb/) | Full<br><br> <hr>Full<hr>Full<hr>Full |
Expand Down
5 changes: 5 additions & 0 deletions v19.2/build-a-java-app-with-cockroachdb-hibernate.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ It does all of the above using the practices we recommend for using Hibernate (a
To run it:

1. Download and extract [hibernate-basic-sample.tgz](https://github.com/cockroachdb/docs/raw/master/_includes/{{ page.version.version }}/app/hibernate-basic-sample/hibernate-basic-sample.tgz). The settings in [`hibernate.cfg.xml`](https://github.com/cockroachdb/docs/raw/master/_includes/{{ page.version.version }}/app/hibernate-basic-sample/hibernate.cfg.xml) specify how to connect to the database.

{{site.data.alerts.callout_info}}
The version of the CockroachDB Hibernate dialect in `hibernate.cfg.xml` corresponds to a version of CockroachDB. For more information, see [Install Client Drivers: Hibernate](install-client-drivers.html#hibernate).
{{site.data.alerts.end}}

2. Compile and run the code using [`build.gradle`](https://github.com/cockroachdb/docs/raw/master/_includes/{{ page.version.version }}/app/hibernate-basic-sample/build.gradle), which will also download the dependencies.

{% include copy-clipboard.html %}
Expand Down
53 changes: 20 additions & 33 deletions v19.2/install-client-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,56 +145,43 @@ For a simple but complete "Hello World" example app, see [Build a Java App with

**Support level:** Full

You can use the [Gradle build tool](https://gradle.org/) to get all dependencies for your application, including Hibernate.
You can use [Gradle](https://gradle.org/install) or [Maven](https://maven.apache.org/install.html) to get all dependencies for your application, including Hibernate. Only Hibernate versions 5.4.19 and later support the Hibernate CockroachDB dialect.

To install Gradle on Mac:
If you are using Gradle, add the following to your `dependencies`:

{% include copy-clipboard.html %}
~~~ shell
$ brew install gradle
~~~
implementation 'org.hibernate:hibernate-core:5.4.19.Final'
implementation 'org.postgresql:postgresql:42.2.14'
~~~

To install Gradle on a Debian-based Linux distribution like Ubuntu:
If you are using Maven, add the following to your `<dependencies>`:

{% include copy-clipboard.html %}
~~~ shell
$ apt-get install gradle
~~~
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.19.Final</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
~~~

To install Gradle on a Red Hat-based Linux distribution like Fedora:

{% include copy-clipboard.html %}
~~~ shell
$ dnf install gradle
~~~
You will also need to specify the CockroachDB dialect in your [Hibernate configuration file](https://www.tutorialspoint.com/hibernate/hibernate_configuration.htm). Versions of the Hibernate CockroachDB dialect correspond to the version of CockroachDB installed on your machine. For example, `org.hibernate.dialect.CockroachDB201Dialect` corresponds to CockroachDB v20.1, and `org.hibernate.dialect.CockroachDB192Dialect` corresponds to CockroachDB v19.2.

For other ways to install Gradle, see [its official documentation](https://gradle.org/install).
All dialect versions are forward-compatible (e.g. CockroachDB v20.1 is compatible with `CockroachDB192Dialect`), as long as your application is not affected by any backward-incompatible changes listed in your CockroachDB version's [release notes](../releases/index.html). In the event of a CockroachDB version upgrade, using a previous version of the CockroachDB dialect will not break an application, but, to enable all features available in your version of CockroachDB, we recommend keeping the dialect version in sync with the installed version of CockroachDB.

For a simple but complete "Hello World" example app, see [Build a Java App with CockroachDB and Hibernate](build-a-java-app-with-cockroachdb-hibernate.html).

### jOOQ

**Support level:** Full

You can use the [Maven build tool](https://gradle.org/) to manage application dependencies.

To install Maven on Mac:

{% include copy-clipboard.html %}
~~~ shell
$ brew install maven
~~~

To install Maven on a Debian-based Linux distribution like Ubuntu:

{% include copy-clipboard.html %}
~~~ shell
$ apt-get install maven
~~~

For other ways to install Maven, see [its official documentation](https://maven.apache.org/install.html).
You can use [Gradle](https://gradle.org/install) or [Maven](https://maven.apache.org/install.html) to get all dependencies for your application, including jOOQ.

For a simple but complete "Hello World" example app, see [Build a Java App with CockroachDB and jOOQ](build-a-java-app-with-cockroachdb-jooq.html).
For a simple but complete "Hello World" example app that uses Maven for dependency management, see [Build a Java App with CockroachDB and jOOQ](build-a-java-app-with-cockroachdb-jooq.html).

</section>

Expand Down
5 changes: 5 additions & 0 deletions v20.1/build-a-java-app-with-cockroachdb-hibernate.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ It does all of the above using the practices we recommend for using Hibernate (a
To run it:

1. Download and extract [hibernate-basic-sample.tgz](https://github.com/cockroachdb/docs/raw/master/_includes/{{ page.version.version }}/app/hibernate-basic-sample/hibernate-basic-sample.tgz). The settings in [`hibernate.cfg.xml`](https://github.com/cockroachdb/docs/raw/master/_includes/{{ page.version.version }}/app/hibernate-basic-sample/hibernate.cfg.xml) specify how to connect to the database.

{{site.data.alerts.callout_info}}
The version of the CockroachDB Hibernate dialect in `hibernate.cfg.xml` corresponds to a version of CockroachDB. For more information, see [Install Client Drivers: Hibernate](install-client-drivers.html#hibernate).
{{site.data.alerts.end}}

2. Compile and run the code using [`build.gradle`](https://github.com/cockroachdb/docs/raw/master/_includes/{{ page.version.version }}/app/hibernate-basic-sample/build.gradle), which will also download the dependencies.

{% include copy-clipboard.html %}
Expand Down
Loading