View Full Version : stores /models explanation

30 Apr 2012, 3:34 AM
hello, i start studing sencha, i have seen a lot of tutorials/books.
i currently work on data. could any one explain me what is the role of each clearly?
my point is that on stores you can set fields and store can only have one model.
but on some tutorials it says store can have a lot of models and it's the bucket of all data.
model also take fields that are passed into lists etc...

anyone could pls could explain the role and how to work with them in simple words?
what's the porpose af each?

2 May 2012, 5:42 AM
A Model definition is the fields that will represent your data. So you define your fields in the Model.

The store will always use s model. Either you define the model config and it will use it or you define the fields config on the store and the store will actually create a model for you so it will always use a model.

A model is a single record. A store is a collection of models.

2 May 2012, 6:57 AM
so i can add two models on a store? and if so how can i do that in architect. thanx

2 May 2012, 7:37 AM
You cannot use two different model definitions to a store no