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

[GSS](7.2.z) HHH-13619 size() does not work properly as select expression

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 7.1.6.GA, 7.2.z.GA
    • Hibernate
    • None
    • +
    • Hide

      I'm attaching a reproducer.

      Show
      I'm attaching a reproducer. Configure the datasource MSSQLDS send a POST request to http://localhost:8080/companies to insert the data to test send a GET request to http://localhost:8080/companies/test (It will return a wrong result)

    Description

      I'm using the following HQL and it return a correct result :

      select distinct new net.rhuanrocha.dto.CompanyDto(c.id,c.name,0) 
          from Company c left join c.customers cu
                where c.name =:name 
                group by c.id, c.name 
      
      

      But when I use the size function in my HQL the query results is wrong (In my case is returning an empty result). Look this HQL:

      select distinct new net.rhuanrocha.dto.CompanyDto(c.id,c.name,size(c.customers)) 
          from Company c left join c.customers cu
                where c.name =:name 
                group by c.id, c.name 
      

      Attachments

        Issue Links

          Activity

            People

              gbadner@redhat.com Gail Badner (Inactive)
              rhn-support-rhsilva Rhuan Rocha (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: