1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Chennai, TN, INDIA
    Posts
    22
    Vote Rating
    0
    dipinkumar is on a distinguished road

      0  

    Default Can a store have multiple models?

    Can a store have multiple models?


    The document says, The store auto-loads a set of User model instances from the URL users.json. So can a store have multiple model instances? How do I tell the store which model instance to be used from the collection of model instances?

  2. #2
    Sencha User
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    497
    Vote Rating
    51
    shepsii has a spectacular aura about shepsii has a spectacular aura about shepsii has a spectacular aura about

      0  

    Default


    Is your question,

    "can a store have multiple model instances?"

    or "can a store work with more than one different model class?"

    The answer the q1 is a simple yes, look at the API for stores, such as getAt(index) etc.

    The answer for q2 is probably no. You might have some luck extending 2 model classes from a base class and then using the base class with the store, maybe it will accept instances of the sub class models, but I'm not sure.

Thread Participants: 1

Tags for this Thread