Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-944

FetchAttribute.recursionDepth = -1 does not load properly self referenced entities in a complex relation

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0, 1.2.0
    • 2.0.0-beta
    • jdbc, kernel
    • None
    • JDK: Sun 1.5
      Database: Derby 10.2.2.0
      OS: Windows XP
    • Patch Available

    Description

      A problem with loading recursively referenced entities was found when there is a complex relation of the following kind:
      Leaf <> BranchConnection <> Branch(1) <- Branch(2) <- ...
      where Branch has a self reference to itself.

      Using a FetchPlan with a fetch group that has a fetch attribute with recursionDepth=-1 does not produce the expected result and only the first of the Branch nodes is loaded.
      Loading a Leaf with 5 branches in a row and traversing through them fails right on level 3 (starting from 5 downwards) which leads to the thought that OpenJPA loads only the first element (along with its direct parent).

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ppoddar@apache.org Pinaki Poddar
            yzhivkov Yanko Zhivkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment