-
Notifications
You must be signed in to change notification settings - Fork 477
CRDB Hibernate Dialect (Hello World example code updates) #7891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1013e33 to
806100a
Compare
|
Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/806100a8dee5d9642b17cae60936b4ce9ea1c671/ Edited pages: |
806100a to
6ca209b
Compare
|
Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/6ca209b78c2a5fcadf88d1aa0264df4a1c93e478/ Edited pages: |
| 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. To enable all features available in your version of CockroachDB, we recommend keeping the dialect version in sync with the installed version of CockroachDB. The dialect version must be no greater than the installed version of CockroachDB, but using a previous version of the CockroachDB dialect will not break an application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a version matrix to clear up the confusion here?
ericharmeling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @rafiss and @vy-ton)
v19.2/build-a-java-app-with-cockroachdb-hibernate.md, line 90 at r1 (raw file):
Previously, vy-ton (Vy Ton) wrote…
Should we add a version matrix to clear up the confusion here?
I don't know if that will help in a note here, to be honest. I'm going to link to install-client-drivers.html, which has more detailed information. Please review the updates in the latest commit.
|
Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/b349298b8f76c1302e889e8f77d66d55ab04d0e0/ Edited pages: |
v19.2/install-client-drivers.md
Outdated
| 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`). 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericharmeling Thoughts on below clarification, based on this thread
All dialect versions are forward-compatible (e.g. CockroachDB v20.1 is compatible with `CockroachDB192Dialect`) assuming your application is unaffected by any backward-incompatible changes found in [release notes](https://www.cockroachlabs.com/docs/releases)
vy-ton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment to provide more detail
b349298 to
819d700
Compare
ericharmeling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @rafiss and @vy-ton)
v19.2/install-client-drivers.md, line 174 at r2 (raw file):
Previously, vy-ton (Vy Ton) wrote…
@ericharmeling Thoughts on below clarification, based on this thread
All dialect versions are forward-compatible (e.g. CockroachDB v20.1 is compatible with `CockroachDB192Dialect`) assuming your application is unaffected by any backward-incompatible changes found in [release notes](https://www.cockroachlabs.com/docs/releases)
Done.
|
Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/819d700f76d9b884b4b52f503e4b50a99a18626d/ Edited pages: |
819d700 to
cd793ed
Compare
cd793ed to
7879639
Compare
|
Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/7879639e98f8b13a364b8021ed245d7a225e28de/ Edited pages: |
Related to #5992.
I've also updated hello-world-java-hibernate to use CockroachDB Hibernate dialect (see cockroachlabs/example-app-java-hibernate@ef4178a).
Note that this PR does not include updates to the Spring JPA example code. Those doc updates depend on a PR to the roach-data repo, so I've made them in a separate PR (#7918).