[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3973) Problem retrieving column name using the AliasToBeanTransformer using jconnect - Sybase.
Gail Badner (JIRA)
noreply at atlassian.com
Fri Jun 19 13:31:36 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33442#action_33442 ]
Gail Badner commented on HHH-3973:
----------------------------------
Please attach a runnable test case (Java + mapping) that reproduces this problem.
> 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
>
>
> 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