Remove the deletion of property type as the instane is shared by the base model class
This commit is contained in:
parent
d697fb5d4e
commit
29c95a4ec7
|
@ -471,9 +471,11 @@ ModelBuilder.prototype.buildSchema = function(name, properties, associations) {
|
|||
var typeDef = {
|
||||
type: type
|
||||
};
|
||||
delete properties[p].type;
|
||||
for (var a in properties[p]) {
|
||||
typeDef[a] = properties[p][a];
|
||||
// Skip the type property but don't delete it Model.extend() shares same instances of the properties from the base class
|
||||
if(a !== 'type') {
|
||||
typeDef[a] = properties[p][a];
|
||||
}
|
||||
}
|
||||
properties[p] = typeDef;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue