Title: RE: [castor-dev] many-key

Thanks Bruce,

I've done that before - it entailed further problems, but I think I have to work at it from another angle as it is apparent that the id's themselves don't work.

You also need to call "setContainer( this )" from addItem, right?

I needed a definitive word on this - I used IDs in my previous project, but they weren't dependants so it made more sense.

Cheers,
Brett

-----Original Message-----
From: Bruce Snyder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 7 May 2002 1:20 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] many-key


This one time, at band camp, Brett Porter said:

BP>Hi Bruce,
BP>
BP>Although my example wasn't quite like that of the example, I have now
BP>changed it so that it is. The result is:
BP>+-------------+----+
BP>| containerId | id |
BP>+-------------+----+
BP>|        NULL |  2 |
BP>|        NULL |  3 |
BP>|        NULL |  4 |
BP>|        NULL |  5 |
BP>|        NULL |  6 |
BP>|        NULL |  7 |
BP>|        NULL |  8 |
BP>|        NULL | 10 |
BP>|        NULL | 11 |
BP>|        NULL | 12 |
BP>+-------------+----+
BP>10 rows in set (0.00 sec)
BP>
BP>When using MySQL with the identity key generator, or the MAX key generator.
BP>
BP>The example did not use a key generator - does anyone know a way around
BP>this?

Brett,

Do you have a bi-directional relationship set up between Item and
Container? This is a requirement for Castor JDO to work properly.
Item must contain a reference to Container and vice versa. See the
examples (Product and ProductDetail).

Bruce
--

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

Reply via email to