Trying to extend User Model as below triggers a 'config.ownerModel is undefined' error. It seems that Ext.data.Association.constructor is called without config while overriding Model.

Code:
    Ext.regModel('Post', {
        fields: ['id', 'user_id'],
        belongsTo: 'User',
        hasMany  : {model: 'Comment', name: 'comments'}
    });
    
    Ext.regModel('Comment', {
        fields: ['id', 'user_id', 'post_id'],
        belongsTo: 'Post'
    });
    
    Ext.regModel('User', {
        fields: ['id'],
        hasMany: [
            'Post',
            {model: 'Comment', name: 'comments'}
        ]
    });
    
    Ext.regModel('UserExtend',{
        extend: 'User'
    });
Cheers
c.