Comparing version 0.1.34 to 0.1.35
@@ -43,3 +43,5 @@ // Generated by CoffeeScript 1.6.2 | ||
model = _this._map(model); | ||
model.owner = _this.owner; | ||
if (typeof model.setOwner === "function") { | ||
model.setOwner(_this.owner); | ||
} | ||
_this._watchRemove(model); | ||
@@ -88,3 +90,5 @@ return model; | ||
model.collection = this; | ||
model.owner = this.owner; | ||
if (typeof model.setOwner === "function") { | ||
model.setOwner(this.owner); | ||
} | ||
model.once("save", function(err) { | ||
@@ -141,2 +145,11 @@ if (err != null) { | ||
Collection.prototype.setOwner = function(value) { | ||
this.owner = value; | ||
return this.set("_owner", value); | ||
}; | ||
/* | ||
*/ | ||
Collection.prototype.hasChanged = function() { | ||
@@ -143,0 +156,0 @@ var item, _i, _len, _ref; |
@@ -86,3 +86,5 @@ // Generated by CoffeeScript 1.6.2 | ||
if (field.options.ref) { | ||
v.owner = model; | ||
if (v._owner) { | ||
v._owner(model); | ||
} | ||
} | ||
@@ -89,0 +91,0 @@ } |
@@ -174,2 +174,11 @@ // Generated by CoffeeScript 1.6.2 | ||
/* | ||
*/ | ||
Model.prototype.setOwner = function(value) { | ||
this.owner = value; | ||
return this.set("_owner", value); | ||
}; | ||
/* | ||
removes the model | ||
@@ -321,3 +330,5 @@ */ | ||
if (field.options.ref && newValue) { | ||
newValue.owner = _this; | ||
if (typeof newValue.setOwner === "function") { | ||
newValue.setOwner(_this); | ||
} | ||
} | ||
@@ -324,0 +335,0 @@ if (newValue != null ? newValue.__isCollection : void 0) { |
{ | ||
"name": "linen", | ||
"version": "0.1.34", | ||
"version": "0.1.35", | ||
"description": "```javascript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
78338
1825