View Full Version : using HasManyAssociation.storeConfig.filters removes auto-generated foreignKey filter

23 Nov 2011, 9:39 AM
[Found no results for "hasmanyassociation filter storeconfig", posting here]

The following code (at line 5394 in sencha-touch-debug.js) makes it dangerous to supplement filters using the storeConfig property of the HasManyAssociation:

config = Ext.apply({}, storeConfig, {
model : associatedModel,
filters : [filter],
remoteFilter : false,
modelDefaults: modelDefaults

Filters specified in storeConfig will cause the auto-generated foreign key filters to not be applied, a pretty unintuitive behavior. Instead, filters should be merged, and filter order spelled out in the documentation or made configurable. Or at least a bolded warning in the storeConfig documentation of HasManyAssociation.

(Haven't looked but I'm assuming a similar type of bug exists in BelongsTo)

23 Nov 2011, 11:33 AM
Development has been moved to ST2. If you find a fix, you can post here for everyone.

26 Nov 2011, 7:47 AM
Thanks Mitchell - the problem is, no one knows when ST2 is going to be ready to use. Is it a month, six months, a year? No idea, and no guidance from Sencha. Developer Preview releases get released occasionally, but no one has given any guidance on when even the API will be stabilized, which makes it impossible to switch development over to ST2, since we could be waiting months (or not!) to actually have a stable version. You guys marketed a lot of promises on what was obviously a beta release of the platform, and are making a ton of promises about ST2, but anybody trying to make something on this platform is basically hung out to dry until one day you announce you're finished.

Pretty crappy. Anyway - I was about to log another bug about Store.findRecord returning null even though the record I'm looking for is verified to have been delivered the server during the call, should I put that here or in ST2? Do you guys even care?