 
               /* Process deletes */
               while (i < oldRec[key].length) {
-                if (!exists(newRec[key], id)) {
-                  /* TODO */
+                cid = oldRec[key][i].id;
+                if (!exists(updRec[key], cid)) {
+                  child = {name: cKlass.name, id: cid};
+                  _delete(child, true);
                 }
+
                 i++;
               }
 
               /* Process inserts and updates */
               i = 0;
               while (i < updRec[key].length) {
-                id = updRec[key][i].id;
+                cid = updRec[key][i].id;
                 row = updRec[key][i];
 
-                if (exists(oldRec[key], id)) {
+                if (exists(oldRec[key], cid)) {
                   if (jsonpatch.compare(oldRec[key][i], row).length) {
-                    _update(cKlass, id, oldRec[key][i], row, true);
+                    _update(cKlass, cid, oldRec[key][i], row, true);
                   }
                 } else {
                   row[props[key].type.parentOf] = {id: updRec.id};

      pk;

    /* Validate */
    if (_isChildClass(klass)) {
      plv8.elog(ERROR, "Can not query directly on a child class");
    }


  };

  _update = function (klass, id, oldRec, newRec, isChild) {
    var result, updRec, props, value, key, sql, i, cKlass, cid, child, err,
      row,
      tokens = [klass.name.toSnakeCase()],
      pk = _getKey(id),
      params = [],
      ary = [],
      p = 1,
      exists = function (ary, id) {
        var n = 0;

        while (n < ary.length) {
          if (ary[n].id === id) { return true; }
          n++;
        }

        return false;
