Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-12156

HQL concat(varchar, int) not working on Sybase and SQL Server

    Details

      Description

      This can be reproduced by running WithClauseTest#testWithClauseAsSubqueryWithKeyAndOtherJoinReference on an affected DB vendor.

      The problematic query: https://github.com/hibernate/hibernate-orm/blob/5.1.8/hibernate-core/src/test/java/org/hibernate/test/hql/WithClauseTest.java#L250

      concat('son', friend.intValue) translates into SQL 'son'+human2_.intValue, but on MS SQL this fails with

      Conversion failed when converting the varchar value 'son' to data type int.
      

      and on Sybase with

      Implicit conversion from datatype 'VARCHAR' to 'INT' is not allowed.  Use the CONVERT function to run this query.
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gbadner Gail Badner
                Reporter:
                jmartisk Jan Martiska
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: