0 Replies Latest reply on Jun 17, 2009 1:08 PM by Joao Fernandes

    Lazy loading many-to-one from a managed call

    Joao Fernandes

      Hi, I have a GameVO (Managed) which has Team1 and Team2 (Both Managed). I have a first fill of games which doesn't return the Team properties(lazy Loaded). My getItem for GameVO does return the the object fully loaded (all properties ) + both teams Lazy loaded (just pk are filled) but if I use the following binding { myGameVO.Team1.teamNameWhichIsNotPK } I get just a getItem request to the gameService.getItem() but not the second call to TeamService.getItem()

       

      From first fill I get

       

      gameVO

      {

           id : int=somevalue;

           name: string=somevalue;

           someProp : String   =somevalue;

           team1: TeamVO;

           team2: TeamVO;

      }    

       

      From the getItem request ( because of the ItemPendingError)

       

      I get this:

       

      gameVO

      {

           id : int=somevalue;

           name: string=somevalue;

           someProp : string=somevalue;  

           team1: TeamVO = {

                                       id : int=somevalue;

                                       prop1:string;

                                       prop2:string; 

                                    }

           team2: TeamVO ={

                                       id : int=somevalue;

                                       prop1:string;

                                       prop2:string;

                                    }

      }   

       

      I was expecting since the binding is to some lazy loaded property in Team1VO, it would make the request for me but doesn't seem to work.

      Is this supported?

       

      Thanks