1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Ukraine, Kherson
    Posts
    30
    Vote Rating
    0
    lufton is on a distinguished road

      0  

    Default AppName.model. Model prefix

    AppName.model. Model prefix


    In SA I add some models and define some relationships between them. I want to use:
    Code:
    var store = person.addresses()
    to get hasMany related store, but there isn't. Because SA defines my model like DB.model.Address but not just Address and I have:
    Code:
    var store = person["db.model.addresses"]
    property with related store.
    How to say SA do not prefix models with AppName.model.?

  2. #2
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    512
    Vote Rating
    17
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    Does setting the 'name' config of the HasMany association give you what you want?

    http://docs.sencha.com/ext-js/4-1/#!...sMany-cfg-name
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Location
    Ukraine, Kherson
    Posts
    30
    Vote Rating
    0
    lufton is on a distinguished road

      0  

    Default


    Yes, thanks, one more question:
    Is there way to prevent loading hasOne association remotely? For my case if json of parent record has nested (hasOne) data then I want to use it else I didn't want ot load them remotely (becouse if json does not contains hasOne data, there is no data on the server and it only creates wrang requests)? Now I use dirty hack:
    Code:
    var address = personAddress["DB.model.AddressHasOneInstance"];
    instead of:
    Code:
    var address = personAddress.getAddress(); // invokes unuseful request if no address: {...} were in personaddress JSON

  4. #4
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    512
    Vote Rating
    17
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    I don't know the answer to your followup question unfortunately. Since it's a framework-related question (not Architect specific) you'd have better luck asking in the Ext JS or Sencha Touch forums. I hope you can find your answer there.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."