Click
  1. Click
  2. CLK-307

CayenneForm: new entry saved multiple times

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: extras
    • Labels:
      None

      Description

      When a user wants to create a new entry in a CayenneForm and save the new entry multiple times, multiple inserts are performed in the database. The reason for this is that the new/generated primary key value is not included in the hidden oid field.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        11m 55s 1 Malcolm Edgar 08/Feb/08 05:00
        In Progress In Progress Resolved Resolved
        3d 1h 9m 1 Malcolm Edgar 11/Feb/08 06:10
        Resolved Resolved Closed Closed
        23d 23h 38m 1 Malcolm Edgar 06/Mar/08 05:48
        Henri Yandell made changes -
        Project Import Fri Mar 20 14:11:32 PDT 2009 [ 1237583492744 ]
        Malcolm Edgar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Malcolm Edgar made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Hide
        Malcolm Edgar added a comment -

        Fix checked in and will be available in release 1.4

        Show
        Malcolm Edgar added a comment - Fix checked in and will be available in release 1.4
        Hide
        Tore Halset added a comment -

        It looks like CayenneForm tried to handle this situation in its toString. Somehow it did not work.

        Show
        Tore Halset added a comment - It looks like CayenneForm tried to handle this situation in its toString. Somehow it did not work.
        Hide
        Tore Halset added a comment -

        The patch does not replace CayenneDataObject with DataObject. It just cast the result of DataObjectUtils.objectForPK() as it returns Object in 3.0 to support pojo.

        Show
        Tore Halset added a comment - The patch does not replace CayenneDataObject with DataObject. It just cast the result of DataObjectUtils.objectForPK() as it returns Object in 3.0 to support pojo.
        Hide
        Tore Halset added a comment -

        That is all needed to get click to compile with cayenne-3.0M3, but I think click compiled with cayenne-2 is not usable with cayenne-3 as some signatures has changed.

        The reason for the signature change and the new casts is that cayenne 3 support persisting pojo in addition to DataObject.

        Show
        Tore Halset added a comment - That is all needed to get click to compile with cayenne-3.0M3, but I think click compiled with cayenne-2 is not usable with cayenne-3 as some signatures has changed. The reason for the signature change and the new casts is that cayenne 3 support persisting pojo in addition to DataObject.
        Hide
        Malcolm Edgar added a comment -

        Hi Tore,

        I haven't yet dealt with upgrading the Cayenne 3.0, is that all we need to do replace CayenneDataObject references with DataObject?

        regards Malcolm Edgar

        Show
        Malcolm Edgar added a comment - Hi Tore, I haven't yet dealt with upgrading the Cayenne 3.0, is that all we need to do replace CayenneDataObject references with DataObject? regards Malcolm Edgar
        Malcolm Edgar made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Tore Halset made changes -
        Field Original Value New Value
        Attachment patch [ 10336 ]
        Hide
        Tore Halset added a comment -

        This patch fixes this bug for me. It also has some DataObject casts needed to build click with cayenne-3.0M3

        Show
        Tore Halset added a comment - This patch fixes this bug for me. It also has some DataObject casts needed to build click with cayenne-3.0M3
        Tore Halset created issue -

          People

          • Assignee:
            Malcolm Edgar
            Reporter:
            Tore Halset
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development