simple problem with loading list of object

From: sabiha (sdilovi..ahoo.com)
Date: Sun Mar 07 2004 - 09:02:04 EST

  • Next message: Andrus Adamchik: "Re: simple problem with loading list of object"

    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

    ---------------------------------
    Do you Yahoo!?
    Yahoo! Search - Find what you’re looking for faster.



    This archive was generated by hypermail 2.0.0 : Sun Mar 07 2004 - 09:02:10 EST