[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3973?page=c...
]
Jose Carlos Canova updated HHH-3973:
-------------------------------------
Attachment: SybaseBugProblem.zip
Hello a runnable eclipse project (all included except hibernate 3.3.1) is attached.... on
database directory there is the ddls (tables + procedure) is attached.
I used the SYBASE 15.0 to execute the test... also i noticed that getLabel was bugged :)
i recommend to test my fix suggestion to download latest jconnect driver... (that was used
to take the screenshots).
I used the jconnect
Product Name: jConnect for JDBC
Platform: Not Platform Specific
Release Version: 6.0.5
Release Description: EBF 16903: 6.05 ESD #16
Release Date: 11 Jun 2009
Problem retrieving column name using the AliasToBeanTransformer using
jconnect - Sybase.
----------------------------------------------------------------------------------------
Key: HHH-3973
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3973
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.6
Environment: JCONNECT 6.0.5 with Sybase 12.0.5
Reporter: Jose Carlos Canova
Attachments: could not execute query.doc, screenshot-1.jpg, screenshot-2.jpg,
SybaseBugProblem.zip
Hibernate CustomLoader$Metadata class on method getColumnName method (line 571) its not
performing correctly when using the a stored procedure calll... Driver had also a problem
which i saw that was fixed. Current version of the jconnect version 6.0.5 return the ALIAS
name (variable on a declare statement...) and the user can get the name of the alias on
getLabelName.... instead of the getColumn name ..
my suggestion for the code is something like that ....
public String getColumnName(int position) throws HibernateException {
try {
Strign columnName = resultSetMetaData.getLabelName( position );
if
(columnName == null or "".equals(columnName.trim())
columnName = resultSetMetaData.getColumnName( position );
return columnName;
}catch( SQLException e )
{
throw new HibernateException( "Could not resolve column name [" + position
+ "]", e );
}
}
A workaroud solution (its urgent) will be very wellcome... (that does not include mapping
the bean on hibernate mapping ... this is not a good solution... ) a tip how to override
the customloader class will be great...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira