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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.2.0, 2.2.1
    • 2.3.0
    • kernel
    • None
    • 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,

      Attachments

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

        Activity

          People

            curtisr7 Richard G. Curtis
            gchauvet Guillaume Chauvet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: