[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5909?page=c...
]
Strong Liu commented on HHH-5909:
---------------------------------
hi
here is what sybase developer tell me
{quote}
I'm not sure what version the reporter use, but ASE 15.x could allow 255-byte
identifier
(
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15...).
And I've tested in ASE 15.x to execute long alias (<255) SQL.
Since getMaxAliasLength() method is used as generating column alias, the reporter use
smaller number is just for bypassing his own issue. But 255 is exact number for maximum
length. It's better that he can provide more details of the environment for
investigation.
{quote}
would you please re-check?
SybaseASE15Dialect getMaxAliasLength() cause SQL exception
----------------------------------------------------------
Key: HHH-5909
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5909
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.0, 3.6.1
Environment: Sybase ASE 15.5 with Sybase JDBC 3 (jconn3.jar)
Hibernate 3.6.0 final
JDK 1.6.0_23
Reporter: Yang Li
Assignee: Strong Liu
Priority: Critical
Original Estimate: 0.5h
Remaining Estimate: 0.5h
After upgrade Hibernate from 3.2.0 to 3.6.0, I got following exception with following SQL
(converted from HQL):
select defaultwdo1_.displayDescriptionTemplate as displayDescriptionTemplate30_1_ from
WJob wjob0_, WDocDist defaultwdo1_
Caused by: com.sybase.jdbc3.jdbc.SybSQLException: The identifier that starts with
'displayDescriptionTemplate30_1' is too long. Maximum length is 30.
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.queryLoop(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.executeQuery(Unknown Source)
at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeQuery(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
The same SQL can be executed in native Sybase ISQL environment without any error.
The workaround using Sybase11Dilect or modify getMaxAliasLength() inside
SybaseASE15Dialect to return a smaller number(e.g. 20)
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira