Skip to content
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

sql: support features used by Hibernate #16491

Closed
16 of 18 tasks
justinj opened this issue Jun 13, 2017 · 12 comments
Closed
16 of 18 tasks

sql: support features used by Hibernate #16491

justinj opened this issue Jun 13, 2017 · 12 comments
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL A-tools-hibernate Issues that pertain to Hibernate integration. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) meta-issue Contains a list of several other issues.

Comments

@justinj
Copy link
Contributor

justinj commented Jun 13, 2017

There's a number of queries issued by the Hibernate test suite that we don't execute properly or cannot parse (for various different reasons), this issue tracks them as they're found and fixed. This list is incomplete and growing as we find more:

Most important:

Mildly more important:

Mildly less important:

Other:

Some of them would probably be better to fix in CockroachDB itself (like temporary tables) and some would be better fixed by a custom Hibernate dialect, and some might be infeasible to fix at all at present.

@justinj justinj added the A-sql-pgcompat Semantic compatibility with PostgreSQL label Jun 13, 2017
@justinj justinj self-assigned this Jun 13, 2017
@justinj justinj added this to the Later milestone Jun 13, 2017
@cuongdo
Copy link
Contributor

cuongdo commented Jun 16, 2017

Can you bucket these by how many tests are failing because of these issues? Perhaps two categories, such as "frequent failure" and "infrequent failure", would be sufficient. I believe this would help the prioritization of these issues.

@justinj
Copy link
Contributor Author

justinj commented Jun 16, 2017

Yeah, sounds good. At the moment I have them roughly sorted by how many failures I estimate they cause (top causing the most), but it's very rough.

@awoods187
Copy link
Contributor

awoods187 commented Feb 14, 2018

Do we need savepoint support (#10735) for Hibernate?

@jordanlewis jordanlewis added meta-issue Contains a list of several other issues. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) labels Apr 26, 2018
@BramGruneir BramGruneir added the A-tools-hibernate Issues that pertain to Hibernate integration. label Jun 14, 2018
@tbg
Copy link
Member

tbg commented Jun 20, 2018

User @Linitha on Gitter ran into the int4/int problem: https://gitter.im/cockroachdb/cockroach?at=5b2a9a626ceffe4eba1d2e24

Hi everyone
We are planning to move from mysql to cockroachDB. Our app uses Hibernate so I ran first time with hibernate.api.hbm2ddl.auto= create and next time when I run with hibernate.api.hbm2ddl.auto= validate I get the following exception:
Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [cancellationReason] in table [api_apple_store_receipt_log]; found [int8 (Types#BIGINT)], but expecting [int4 (Types#INTEGER)]
My entity class have:
private Integer cancellationReason;

@awoods187
Copy link
Contributor

cc @knz

@BramGruneir BramGruneir assigned BramGruneir, knz and awoods187 and unassigned justinj Jun 25, 2018
@knz
Copy link
Contributor

knz commented Jun 25, 2018

@Linitha @tschottdorf we plan to work on that as #26925.

@tim-o
Copy link
Contributor

tim-o commented Jul 11, 2018

Zendesk ticket #2504 has been linked to this issue.

@tim-o
Copy link
Contributor

tim-o commented Aug 11, 2018

Comment made from Zendesk by Tim O'Brien on 2018-08-11 at 18:22:

Paging @Bram for hibernate expertise. At the moment I believe it’s not fully supported and non-trivial. Unsure whether this specific issue is known or not.

@tim-o
Copy link
Contributor

tim-o commented Aug 11, 2018

Comment made from Zendesk by Tim O'Brien on 2018-08-11 at 18:23:

Hi @vladimir_shulga,

We’re actually working on just this problem right now. What happens is this is a combination of the fact that our transactions work slightly differently than postgres’ and Hibernate doesn’t know how to handle this just yet and we return some different errors.

This example should show you how to approach it without Hibernate, and we’re actively working on getting it working properly with Hibernate.

We have a number of issues still to get Hibernate working, here’s the meta issue for it: #16491

Please feel free to post your issue directly as a bug in our github. External requests help us prioritize fixes and updates.

@tim-o
Copy link
Contributor

tim-o commented Aug 11, 2018

Comment made from Zendesk by Tim O'Brien on 2018-08-11 at 18:23:

Hi @Bram,

Thank you for clarifying this question out!
I’ve created the issue #27274. Do you know how much could it take to have it fixed?

@petermattis petermattis removed this from the Later milestone Oct 5, 2018
@jordanlewis
Copy link
Member

This feels like it's outlived its usefulness - cc @rafiss @solongordon maybe want to close this one?

@rafiss
Copy link
Collaborator

rafiss commented Oct 6, 2020

Yes we don't need this now. For anyone else looking here, please try out the CockroachDBDialect in Hibernate, and let us know if you have issues.

@rafiss rafiss closed this as completed Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL A-tools-hibernate Issues that pertain to Hibernate integration. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) meta-issue Contains a list of several other issues.
Projects
None yet
Development

No branches or pull requests

10 participants