--- Phil Cornelius <[EMAIL PROTECTED]> wrote:
> This bug was fixed last night.. you have to get the
> latest source from cvs.
> 

  Phil, please answer this to me.
  This is leting me crazy, I am for one week halted on
my project because of this.
  I have a 2 entity with a relationship 1-N bettwen
them. 1 Company has N departaments.
  On Company I have the methods who make the
relationship with departament :

        public abstract Collection getDepartaments();
        public abstract void setDepartaments(Collection
departaments);

  Then I have this function on my Bean who receives a
primary key to the departament and load the
correspondent Departament using his local interfaces.
Then it add it on the collection of departaments.

        public void getNames(Integer id) throws
RemoteException {
                try {
                        InitialContext ctx = new InitialContext();
                        DepartamentLocalHome departament_lh =
(DepartamentLocalHome)
ctx.lookup("java:comp/env/ejb/DepartamentLocalHome");
                        DepartamentLocal departament_l =
departament_lh.findByPrimaryKey(new
DepartamentPK(id));
                        Collection c= getDepartaments();
                        c.add(departament_l);
                        setDepartaments(c);
                } catch (Exception e) {
                        System.out.println(e.getMessage());
                }
        }

  But this is not working. 
  I can not set the relationship on the database
table. If I update the database using SQL ("update
table Departament set companyid=1" for example) the
relationships are loaded ok. This is the
getDepartament on this funcions return the list ok.
But when I call setDepartament not only the new
departament is not added to the list but all other
ones are with NULL.
  I only want to know of you if this is the problem
solved on CVS last night. 

> Yours
> Phil
> 
> ----- Original Message -----
> From: "James Compton" <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'"
> <[EMAIL PROTECTED]>
> Sent: Friday, June 14, 2002 9:16 AM
> Subject: [JBoss-user] CMR
> 
> 
> > Hi
> >
> > We are trying to use CMR in JBoss here, but are
> unsuccessful in our
> > attempts. Basically, as an example, in a
> User-Address relationship we have
> > the foreign key to Address in User. Thus we create
> a CMR in this and it
> > creates the 2 tables with only the foreign key to
> Address in the User
> table.
> > But, when you try to create a User and and Address
> using the proper
> methods,
> > the foreign key column is not populated. And
> furthermore, when you try to
> > get the AddressLocal from the UserLocal, it is
> null.
> >
> > My question is: is CMR working correctly in JBoss
> 3?
> >
> > Regards,
> >
> > James
> >
> > James Compton
> > Web Developer
> > web: www.bluecycle.co.uk
> > eMail: [EMAIL PROTECTED]
> > phone: +44 (0) 2079225148
> > fax: +44 (0) 2079225020
> > address: Union House, 182-194 Union Street,
> London, SE1 0LH
> >
> >
> >
>
_______________________________________________________________
> >
> > Don't miss the 2002 Sprint PCS Application
> Developer's Conference
> > August 25-28 in Las Vegas -
>
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> >
>
https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> 
> 
>
_______________________________________________________________
> 
> Don't miss the 2002 Sprint PCS Application
> Developer's Conference
> August 25-28 in Las Vegas -
>
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/jboss-user


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to