View Full Version : Load Multiple Models using Store.

26 Jan 2011, 6:30 AM
Hi All,
I have two associated models User and Meal.

Ext.regModel('User', {
fields:[ 'id','uuid', ‘name’ ],
associations: [
{type: 'hasMany', model: 'Meal', name: 'Meal', associationKey: 'Meal'}
Ext.regModel('Meal', {
});I want to load these two models using Store. Here is code for Store.

var store = new Ext.data.Store({
model: 'User',
storeId: 'UserStore',
proxy: {
type: 'ajax',
url : 'http://myurl',
reader: {
type: 'xml',
root: 'response',
record: 'User'
filters: [],

The XML response is:

<?xml version="1.0" encoding="utf-8"?>

and when i Load the store it only load the User data instead of both User and Meal data. Any urgent help is my pleasure. thanks in advance