revert change to ReferencesMany.prototype.add

Signed-off-by: Clark Wang <clark.wangs@gmail.com>
This commit is contained in:
Clark Wang 2014-09-01 13:35:34 +08:00
parent 86045d4792
commit 770cc7eda8
1 changed files with 1 additions and 6 deletions

View File

@ -2554,16 +2554,11 @@ ReferencesMany.prototype.build = function(targetModelData) {
* Add the target model instance to the 'embedsMany' relation
* @param {Object|ID} acInst The actual instance or id value
*/
ReferencesMany.prototype.add = function (acInst, data, cb) {
ReferencesMany.prototype.add = function (acInst, cb) {
var self = this;
var definition = this.definition;
var modelTo = this.definition.modelTo;
var modelInstance = this.modelInstance;
if (typeof data === 'function') {
cb = data;
data = {};
}
var pk = this.definition.keyTo;
var fk = this.definition.keyFrom;