-
10 May 2012 4:00 AM #1Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,455
- Vote Rating
- 50
[4.1.0] 'id' field leak
[4.1.0] 'id' field leak
Seems the 'id' field leaks into all subclassed models (breaks deserialization in ASP.NET for example).Code:Ext.define('foo', { extend : 'Ext.data.Model', fields : ['bar'] }); foo.prototype.fields.length; ==> 2
-
15 May 2012 7:39 AM #2
Thank you for the report.
Regards,
Scott.
-
14 Jun 2012 2:23 AM #3
Any updates on this one? I and probably most of developers would like this fixed.
id field should be default, but using some property we should be allow to overwrite this.
Something like:
It isn't so hard to fix I guessCode:Ext.define('foo', { extend : 'Ext.data.Model', idProperty : 'Id',//this is what we need! fields : [{name : 'Id', type : 'string'},//here I would like to store user guid {name : 'Name', type : 'string'}, {name : 'Department', type : 'string'}] });
-
30 Jul 2012 6:40 AM #4
Any update on this? It is causing major problems for us.
-
30 Jul 2012 6:47 AM #5
This is currently slated for the 4.2 release.
Scott.
-
1 Aug 2012 5:46 AM #6
-
1 Aug 2012 7:23 AM #7
In the near future

There is no public release date at this time.
Scott.
-
11 Dec 2012 11:56 PM #8
I know that 4.2 beta was released just couple of hours ago, but is this tiny bug fixed in this release?

-
12 Dec 2012 12:06 AM #9Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,455
- Vote Rating
- 50
If you use 'idProperty', the bug is not reproducible.
-
18 Jan 2013 12:03 PM #10
It's not really a "leak"
It creates an id field for you based upon the default idProperty in Models which is "id"
A Model must have some identifier.
But if you really do not want that (eg an abstract base Model class), then you can
Code:Ext.define('foo', { idProperty: null, // No identifying field in this Model extend : 'Ext.data.Model', fields : ['bar'] });Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
You found a bug! We've classified it as
EXTJSIV-6213
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote