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

Many-to-many collection is not lazily loaded if entity has been merged into context right after persist

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: jpa
    • Labels:
      None

      Description

      Steps are the following:
      1) Persist an entity which has a many-to-many collection link;
      2) Create related entity;
      3) Merge first entity to another persistence context.
      4) Try to lazily load collection - it does not get loaded.

      If you reload the entity in a separate transaction through entityManger.find() before merging - lazy loading works.

      Test project with two test cases attached (please run test methods separately).

        Attachments

        1. testcase-mtm.zip
          6 kB
          Alexander Budarov

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alexbudarov Alexander Budarov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: