[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3973) Problem retrieving column name using the AliasToBeanTransformer using jconnect - Sybase.
Jose Carlos Canova (JIRA)
noreply at atlassian.com
Thu Jun 18 18:38:33 EDT 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
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list