Skip to content

HHH-5909 improving alias generation in columns #2666

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

Closed
wants to merge 46 commits into from

Conversation

SchlauFuchs
Copy link

Hi,

I am fixing https://hibernate.atlassian.net/browse/HHH-5909, as it causes me some pain.

Enjoy.

@SchlauFuchs
Copy link
Author

Incomplete, found another aliasing issue

@SchlauFuchs
Copy link
Author

I am not sure why travis fails in so many places (other than assuming very strict assumptions/expectations on other tests. I am using this patch in our environment and it does as expected.

@gbadner
Copy link
Contributor

gbadner commented Dec 20, 2018

@SchlauFuchs, I'm seeing the same test failures when I run the tests locally. Have you looked into why this is happening?

@SchlauFuchs
Copy link
Author

SchlauFuchs commented Dec 20, 2018 via email

Naros and others added 20 commits January 10, 2019 10:52
…nly an identity-based column.

Exclude tests failing for SAP HANA and add the supportNoColumnInsert method in Dialect to be used by the Insert class
HHH-13129 : Move and reformat test

HHH-13129 : Add more tests
The first commit was on the safe side, we decided to go the extra mile
and that was a mistake as we missed all the consequences.

The new issue is about having a shared ReaderCollector: we add the info
there for each batch which leads to collecting the elements several
times.

This reverts commit a19fc84.

HHH-13059 : Correct Javadoc
Keep the test and add a @FailureExpected annotation
@vladmihalcea
Copy link
Contributor

vladmihalcea commented Jan 17, 2019

@SchlauFuchs The SellCarTest fails and I think it's not worth adding this change in 5.x as long as 6.0 changes the SQL rendering and it does not even use aliases.

Changing the alias generation is risky and the current solution is also "hacky". I think we should close this issue and wait for 6.0 to validate the new SQL rendering implementation.

… Self Referential Entity with Single_Table Inherited Entities
@SchlauFuchs
Copy link
Author

SchlauFuchs commented Jan 17, 2019 via email

@vladmihalcea
Copy link
Contributor

This issue is quite old so it affects all versions of Hibernate, not just 5.4.

If the issue is really important for you, you could try to enhance it so that all tests pass. Anyway, modifying the Column alone is not enough. The aliases used during JPQL parsing is not covered by this PR. So, there's more work to be done to fix this propertly.

Sanne and others added 12 commits January 17, 2019 19:03
Currently, we don't have a way to properly handle enum literals so get back to
using parameter binding, which was used before in the "case when" case
due to a bug fixed in HHH-13001.

Note that this forces the usage of enum literals even at the root of the
select clause.
It was removed as part of
hibernate#1361 but this PR didn't
fix all the issues as there are still cases where we don't deduce the
expected type and we need to have a proper cast.
…Expected

Reintroducing CaseLiteralExpression had some issues with databases other
than H2 as it tried to cast to binary even if the enum was stored as
enumerated. Unfortunately, we cannot really know if the enum is in the
end compared to a value stored as a string or a number.
@gbadner
Copy link
Contributor

gbadner commented Mar 27, 2019

PR is out-of-date.

@gbadner gbadner closed this Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.