WaveMaker
  1. WaveMaker
  2. WM-3852

LiveVariable updates contain empty related objects

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 6.4.5 GA
    • Fix Version/s: 6.5.0 M1
    • Component/s: None
    • Security Level: Public (The World)
    • Labels:
      None

      Description

      Testcases in node 7904 and 7932 (http://dev.wavemaker.com/forums/?q=node/7932)

      Perform insert and all is well.
      Perform update after insert and update includes empty nested related objects.
      Reload app and can perform update ok. Related objects not included.

      Symptoms include nulling of relating objects and FK constraint errors (not-null property references a null or transient value)

      Changing _clearData to delete live type subnards tested with psql testcase (7932)
      {code:javascript}
      wm.Variable.extend({
          _clearData: function() {
      this._isNull = false;
      this._nostub = false;
      if (!this.data)
      this.data = {};
      if (this.isList)
      this.data = {list: []};
      else {
      // maintain any subNards, but otherwise clear data
      var d;
      for (var i in this.data) {
      d = this.data[i];
      if (d instanceof wm.Variable && !wm.typeManager.getLiveService(d.type))
      d._clearData();
      else
      delete this.data[i];
      }
      }
      }
      });
      {code}

        Activity

          People

          • Assignee:
            Ed Callahan
            Reporter:
            Ed Callahan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: