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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3d 19h 12m 1 Rick Curtis 26/Mar/13 12:44
        Resolved Resolved Closed Closed
        802d 8h 35m 1 Mark Struberg 06/Jun/15 21:19
        Mark Struberg made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Rick Curtis made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.3.0 [ 12319463 ]
        Resolution Fixed [ 1 ]
        Hide
        Rick Curtis added a comment -

        Committed revision 1461090 to trunk. Thanks for the patch Guillaume!

        Show
        Rick Curtis added a comment - Committed revision 1461090 to trunk. Thanks for the patch Guillaume!
        Hide
        ASF subversion and git services added a comment -

        Commit 1461090 from curtisr7
        [ https://svn.apache.org/r1461090 ]

        OPENJPA-2357: Fix InvalidStateException when using the InverseManager. Fix contributed by Guillaume Chauvet.

        Show
        ASF subversion and git services added a comment - Commit 1461090 from curtisr7 [ https://svn.apache.org/r1461090 ] OPENJPA-2357 : Fix InvalidStateException when using the InverseManager. Fix contributed by Guillaume Chauvet.
        Rick Curtis made changes -
        Assignee Rick Curtis [ curtisr7 ]
        Guillaume Chauvet made changes -
        Description Hi,

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

        This bug does not exist on 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 OpenPJA 2.2.1 and in our software.

        Regards,
        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,
        Guillaume Chauvet made changes -
        Field Original Value New Value
        Attachment OPENJPA-2357.patch [ 12575050 ]
        Attachment OPENJPA-22357.zip [ 12575051 ]
        Guillaume Chauvet created 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