ipavlic
12 Oct 2012, 4:17 AM
I have an entity defined like this:
Ext.define('MyApp.model.Entity', { extend : 'Ext.data.Model',
fields : [ {
name : 'id',
type : 'int'
} ]
});
If I instantiate it and look at the id, it will have a default value of 0:
var entity = Ext.create('MyApp.model.Entity');
console.log(entity.getId()); //will output '0' instead of 'undefined'
Is this expected behaviour? Why?
Ext.define('MyApp.model.Entity', { extend : 'Ext.data.Model',
fields : [ {
name : 'id',
type : 'int'
} ]
});
If I instantiate it and look at the id, it will have a default value of 0:
var entity = Ext.create('MyApp.model.Entity');
console.log(entity.getId()); //will output '0' instead of 'undefined'
Is this expected behaviour? Why?