Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-5898

HHH-1283: ScrollableResults JoinFetch don't set child collection correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.1.1
    • EAP_EWP 5.1.0
    • Hibernate
    • Fedora 12, JDK 1.6 sun/oracle, PostegreSQL 8.3

    • Workaround Exists
    • Hide

      removing the fetch join on the collection, but it results in n+1 selects.

      Show
      removing the fetch join on the collection, but it results in n+1 selects.
    • Hide
      A customer reported an issue with the ScrollableResults JoinFetch, where ScrollableResults set child collection correctly at the first parent object, but after the second parent object only the first element of a child collection was included.

      The ScrollableResults logic has been improved to read sequentially. When a new parent is encountered, ScrollableResults assumes it has finished processing all rows for the previous parent.

      IMPORTANT
      This fix relies on results being ordered consistently. Because some databases do not return sorted data (such as H2) you should explicitly apply "order by" for ScrollableResults result ordering.
      Show
      A customer reported an issue with the ScrollableResults JoinFetch, where ScrollableResults set child collection correctly at the first parent object, but after the second parent object only the first element of a child collection was included. The ScrollableResults logic has been improved to read sequentially. When a new parent is encountered, ScrollableResults assumes it has finished processing all rows for the previous parent. IMPORTANT This fix relies on results being ordered consistently. Because some databases do not return sorted data (such as H2) you should explicitly apply "order by" for ScrollableResults result ordering.
    • Documented as Resolved Issue
    • ASSIGNED

      ScrollableResults JoinFetch set child collection correctly at first parent object, but after the second parent object, It set only the first element of a child collection.

      Please, look http://opensource.atlassian.com/projects/hibernate/browse/HHH-1283 and http://opensource.atlassian.com/projects/hibernate/browse/HHH-1751 for a detailed description. Both issue cases have attached patches.

            shaozliu Strong Liu(刘少壮) (Inactive)
            rhn-support-alazarot Alessandro Lazarotti
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: