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

HHH-18629 Fix inconsistent column alias generated while result class is used for placeholder #8971

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Sep 18, 2024

wrong fileid’s alias fileid1_0_0_ is used instead of fileid1_0_1_ while transforming ResultSet to Book.

Column "fileid1_0_0_" not found [42122-224]
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "fileid1_0_0_" not found [42122-224]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:514)
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
	at org.h2.message.DbException.get(DbException.java:223)
	at org.h2.message.DbException.get(DbException.java:199)
	at org.h2.jdbc.JdbcResultSet.getColumnIndex(JdbcResultSet.java:3492)
	at org.h2.jdbc.JdbcResultSet.findColumn(JdbcResultSet.java:178)
	at org.hibernate.sql.results.jdbc.internal.AbstractResultSetAccess.resolveColumnPosition(AbstractResultSetAccess.java:63)

[Please describe here what your change is about]


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-18629

wrong fileid’s alias fileid1_0_0_ is used instead of fileid1_0_1_ while transforming ResultSet to Book.

```
Column "fileid1_0_0_" not found [42122-224]
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "fileid1_0_0_" not found [42122-224]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:514)
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
	at org.h2.message.DbException.get(DbException.java:223)
	at org.h2.message.DbException.get(DbException.java:199)
	at org.h2.jdbc.JdbcResultSet.getColumnIndex(JdbcResultSet.java:3492)
	at org.h2.jdbc.JdbcResultSet.findColumn(JdbcResultSet.java:178)
	at org.hibernate.sql.results.jdbc.internal.AbstractResultSetAccess.resolveColumnPosition(AbstractResultSetAccess.java:63)
```
@quaff quaff changed the title HHH-18629 add test for issue HHH-18629 Fix inconsistent column alias generated while result class is used for placeholder Sep 18, 2024
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.

1 participant