1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Mercer Island, WA
    Posts
    66
    Vote Rating
    0
    DonRul is on a distinguished road

      0  

    Default How to create an SQL type View with Stores

    How to create an SQL type View with Stores


    I have two related stores with a common key/foreign key. A patient has a list of medications that are described by RXCUI and RXCUI can be used to lookup the drug name. I've experimented with HasOneAssociation but that seems to apply to Models not Stores.

    Is there some simple way to extend the model that is applied to the store such that the model does a findRecord in the appropriate store?

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Location
    Mercer Island, WA
    Posts
    66
    Vote Rating
    0
    DonRul is on a distinguished road

      0  

    Default


    Here is the kludge that I came up with but I am sure that there must be a better way. I just wait for the store to be refreshed and then insert the names associated with the foreign key into it.

    PHP Code:
        onJsonstoreRefresh: function(storedataeOpts) {
            var 
    drugStore Ext.data.StoreManager.lookup('DrugNameStore');
            var 
    viewStore Ext.data.StoreManager.lookup('DrugPatientMedicationViewStore');
            if (
    store.getCount() > 0) {
                
    store.each(function(rec){
                    
    drugRec drugStore.findRecord("RXCUI"rec.data.RXCUI);
                    if (
    drugRec)
                    
    rec.DrugName drugRec.data.DrugName1;
                });
                if (
    viewStore)
                
    viewStore.setData(store.data);
            }
        } 

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..." hd porno faketaxi