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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.1.0
    • Fix Version/s: EAP_EWP 5.1.1
    • Component/s: Hibernate
    • Labels:
    • Environment:

      Fedora 12, JDK 1.6 sun/oracle, PostegreSQL 8.3

    • Workaround:
      Workaround Exists
    • Workaround Description:
      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.
    • Release Notes Text:
      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.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      ASSIGNED

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stliu Strong Liu
                  Reporter:
                  alessandrolt Alessandro Lazarotti
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: