I cannot update object Test t, since it is entirely new - does not exist in 
the DB or in cache yet.
So I call the constructor

Test t= new Test(70);

then I fetch an existing (in the DB) object of type Company

Company c = pm.findByPrimaryKey(test.Company.class, new Integer(30));

then set object t to point to object c

t.setCompany(c);

and finally, I want to create t in the persistent sense:

pm.create(t)

I cannot call pm.update(t) since t does not exist in the DB yet.

-- Jacek






>Take a look at org.exolab.castor.jdo.Database.update(). Also why
>are you using a pm.create()? I believe that this is part of the
>problem. If I'm not mistaken, this forces a create. commit() might
>have been a better choice here.
>
>--
>
>perl -e 'print 
>unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

Jacek Kruszelnicki
Numatica Corporation
E-mail: [EMAIL PROTECTED]
Phone: (781) 756 8064

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to