Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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
-
Forum Thread URL:
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}
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}