[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-518) Incorrectly generated SQL from MapBinder

Arnout Engelen (JIRA) noreply at atlassian.com
Sun Jan 7 17:32:44 EST 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-518?page=comments#action_25751 ] 

Arnout Engelen commented on ANN-518:
------------------------------------

Indeed MySQL does allow an 'as' there (http://dev.mysql.com/doc/refman/5.0/en/join.html), however Oracle 10g (under which I ran into this problem) does not seem to (http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_10002.htm#i2126863).

Not sure if it should be allowed as per the SQL standard, but omitting it here appears to me like a simple solution that is unlikely to introduce other problems.

> Incorrectly generated SQL from MapBinder
> ----------------------------------------
>
>          Key: ANN-518
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-518
>      Project: Hibernate Annotations
>         Type: Bug

>   Components: binder
>     Reporter: Arnout Engelen

>
>
> http://fisheye.jboss.org/browse/Hibernate/trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/MapBinder.java?r=trunk#l264
> StringBuilder fromAndWhereSb = new StringBuilder( " from " )
>  	                                        .append( associatedClass.getTable().getName() )
>  	                                        .append(" as ").append(alias).append(" where ");
> Should probably be:
> StringBuilder fromAndWhereSb = new StringBuilder( " from " )
>  	                                        .append( associatedClass.getTable().getName() )
>  	                                        .append(alias).append(" where ");

-- 
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