1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    11
    Vote Rating
    0
    calicoder is on a distinguished road

      0  

    Default BeanModelMarker POJO inheritance

    BeanModelMarker POJO inheritance


    I have a base class called Identifiable. The Identifiable class has two private fields (Long id, Integer version). Each of my
    POJOs extends the Identifiable base class to adhere to Hibernate.

    My problem is that when I write a BeanModelMarker like this where MyPojo extends Identifiable:

    Code:
    @BEAN(MyPojo.class)
    public interface MyPojoBeanModel extends BeanModelMarker {
    
    }
    the 'id' and 'version' fields are always null.

    Any clues?

  2. #2
    Sencha User
    Join Date
    Apr 2009
    Posts
    30
    Vote Rating
    0
    rian.k is on a distinguished road

      0  

    Default


    Haven't tried BeanModels in grids, but I noticed the mapping of field names was inconsistent when I tried to reference them via a XTemplate. E.g. I had two fields in two Beans:
    Code:
    private String sPropertyName;
    
    private String sFunctionName;
    while their `stringified' version in the Models ended up to be:
    Code:
    get("propertyname");
    
    get("functionName");

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    11
    Vote Rating
    0
    calicoder is on a distinguished road

      0  

    Default


    I haven't noticed that when using it with grids. I think that this behavior, the behavior that I'm describing is intentional since the object graph could get crazy big if not careful. I wonder if there is a way to override that behavior and bring up inherited fields as well as defined fields?

  4. #4
    Ext User
    Join Date
    Jun 2008
    Posts
    365
    Vote Rating
    0
    sdc is on a distinguished road

      0  

    Default


    Does your Identifiable class have getters and setters for these 2 attributes ?

  5. #5
    Ext User
    Join Date
    Jun 2008
    Posts
    11
    Vote Rating
    0
    calicoder is on a distinguished road

      0  

    Default


    yes, both public

  6. #6
    Ext User
    Join Date
    Apr 2009
    Posts
    33
    Vote Rating
    0
    brendand is on a distinguished road

      0  

    Default


    Quote Originally Posted by calicoder View Post
    yes, both public
    what are the names of the getters and setters?

    I'm guessing you have getPropertyname, setPropertyname, getFunctionName, setFunctionName.

  7. #7
    Ext User
    Join Date
    Jun 2008
    Posts
    11
    Vote Rating
    0
    calicoder is on a distinguished road

      0  

    Default


    getId, setId
    getVersion, setVersion

    ...naturally

  8. #8
    Sencha User
    Join Date
    Apr 2009
    Posts
    30
    Vote Rating
    0
    rian.k is on a distinguished road

      0  

    Default


    Quote Originally Posted by brendand View Post
    what are the names of the getters and setters?

    I'm guessing you have getPropertyname, setPropertyname, getFunctionName, setFunctionName.
    Uh thanks, that solved my problem! I'm digging a hole now..

Thread Participants: 3

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