OpenJPA
  1. OpenJPA
  2. OPENJPA-2357

@..ToMany(optional=false) throws InvalidStateException: [...] the metadata for this field specifies that nulls are illegal.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 2.2.1
    • Fix Version/s: 2.3.0
    • Component/s: kernel
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Hi,

      We have discovered a bug in OpenJPA when InverseManager is used with collection annoted @toMany([...], optional = false). OpenJPA doesn't solve inverse relations before calling the internal preflush method.

      This bug does not exist on versions 2.1.0 and 2.1.1.

      A unitary test and a small patch is worth a thousand words [1]

      [1] Patch successfully tested on OpenJPA 2.2.1 and in our software.

      Regards,

      1. OPENJPA-22357.zip
        7 kB
        Guillaume Chauvet
      2. OPENJPA-2357.patch
        0.8 kB
        Guillaume Chauvet

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Rick Curtis
            Reporter:
            Guillaume Chauvet
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development