I needed to implement a custom association class and ran into several problems:
- the Model class uses some unorthodox loading method
- the Association "create" classmethod does not accept any type other than the three builtins
Why this arbitrary limitation ? I'm sure there is a valid reason for putting these restrictions in place that I overlooked.
Anyway, please find a patch attached that can serve as a basis for allowing custom association classes.
The changes are the following:
- add a "cardinality" class attribute on all associations. This is then used in Model.getAssociatedData instead of the type itself.
- add a default case to the static create classmethod, defaulting to Ext.create(association.type)