Re: simple problem with loading list of object

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Mar 07 2004 - 13:59:11 EST

  • Next message: Tore Halset: "prefetch in 1.1M4"

    Hi Sabiha,

    Cayenne currently has limitations in modeling inheritance (hopefully to
    be resolved in soon in 1.1). Could you send me your DataMap XML file? I
    will take a look to see if this is the cause of your problems.

    Thanks
    Andrus

    On Mar 7, 2004, at 9:02 AM, sabiha wrote:
    > Hello,
    >
    > I’m new in using Cayenne and I do on getting some basic ideas of it.
    > My simple database model consists of a few tables among which there
    > are Worker, Manager and Developer. Manager and Developer are inherited
    > from Worker. (Inheritance is achieved in that way that Manager and
    > Developer beside their ids consist worker id as foreign key.) There is
    > also relationship (1:n) between Manager and Developer. What I want is
    > to get all developers of one manager.
    >
    > I tried with code like this:
    >
    > Worker worker = (Worker)name4.get(l);
    >             if (worker.getToManager().getWorkerId() != null)
    >
    >                 {          
    >            Manager manager =
    > worker.getToManager();                     
    >            List developers = manager.getDeveloperArray();
    >             int len5 = developers.size();
    >
    > and here I got that length of developer’s list is 0. I wish to know
    > what I’m doing wrong. Is it up to my model or I do something wrong
    > with Cayenne?   
    >
    > Thank you  
    >
    > Greetings from Sarajevo
    > Sabiha



    This archive was generated by hypermail 2.0.0 : Sun Mar 07 2004 - 13:59:16 EST