Torque
  1. Torque
  2. TORQUE-9

BasePeer.doDelete() should not load the datasets to delete them

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0, 3.1, 3.1.1, 3.2
    • Fix Version/s: 4.0-beta1
    • Component/s: Runtime
    • Labels:
      None
    • Old Scarab Id:
      TRQS292

      Description

      In BasePeer.doDelete, all datasets which should be deleted are loaded. This introduces significant overhead, but is only necessary for cascading deletes.
      For non-cascading deletes, the datasets should not be loaded, but a "delete from ..." statement should be issued instead.

        Activity

        Hide
        Thomas Fox added a comment -

        Implemented the doDelete Method for a List of Data Objects

        Show
        Thomas Fox added a comment - Implemented the doDelete Method for a List of Data Objects
        Hide
        Thomas Fox added a comment -

        Not all SQL statements which are working for "select then delete" work for a direct "delete from XXX", e.g. joins do not work at least for oracle and mysql.
        For these cases, a simple workaround should be given by
        List<X> xList = XPeer.doSelect(criteria);
        XPeer.doDelete(xList);

        The latter method still needs to be implemented.

        Show
        Thomas Fox added a comment - Not all SQL statements which are working for "select then delete" work for a direct "delete from XXX", e.g. joins do not work at least for oracle and mysql. For these cases, a simple workaround should be given by List<X> xList = XPeer.doSelect(criteria); XPeer.doDelete(xList); The latter method still needs to be implemented.

          People

          • Assignee:
            Thomas Fox
            Reporter:
            Thomas Fox
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development