1. #1
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    124
    Answers
    1
    Vote Rating
    0
    JavascriptParrot is on a distinguished road

      0  

    Question Unanswered: Model convert field, hasMany properties empty?

    Unanswered: Model convert field, hasMany properties empty?


    Hello all,

    I have the follow model, but when I try to get the data of PI I got an empty set back. I have the same problem in one of my controllers. Using a mapping to PI.suts works fine, but I need also the first item from PI.p

    PHP Code:
    Ext.define('app.model.Artikel', {    
    extend'Ext.data.Model',    config: {
            
    fields: [
                { 
                   
    name'Nr',
                    
    type'int'
                
    },
                {
                    
    name'Nm',
                    
    type'string'
                
    }, {
                    
    name'Test',
                    
    type'String',
                    
    mapping'PI.suts' //THIS WORKS FINE!!
                
    },
                {
                    
    name'Sample',
                    
    convert: function(vrecord) {
                        
    //return record.PI() the length off data is 0
                      //how to get the first p from PI
                    
    }
                }
            ],
            
    hasMany: {
                
    name'PI',
                
    model'app.model.EenheidInformatie'
            
    }
        } 
    The model using for the hasMany
    PHP Code:
    Ext.define('iperenMobile.model.EenheidInformatie', {
        
    extend'Ext.data.Model',
        
    config: {
            
    fields: [
                {
                    
    name'sut',
                    
    type'string'
                
    },
                {
                    
    name'suts',
                    
    type'string'
                
    },

            
    hasMany: {
               
    name'p',
               
    model'app.model.Eenheid'
           
    }

            ],
        }}); 
    PHP Code:
    Snippet from controller
    onSomeListTap
    : function(list, record){
        var 
    data record.raw.Products//array using in a list
        //here record.Products() data array is empty

    What is going wrong with the hasMany fields in the model, what I'm doing wrong? I hope you understand what I mean. It's hard to me to explain and write it down in readable English.

    Thanks,
    Gertjan
    -->

  2. #2
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    124
    Answers
    1
    Vote Rating
    0
    JavascriptParrot is on a distinguished road

      0  

    Default


    Update: when I try to get the hasOne from record I got.

    PHP Code:
    record.getHasOne()
    null 
    Hope someone help me...
    -->

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