Hello Brian,
> -----Original Message-----
> From: Brian McCallister [mailto:[EMAIL PROTECTED]
> > Which concrete class is instantiated
> > for the list field?
>
> Default - I don't specify anything so should be a Vector.
I bet this is the problem. You'd probably better
use one of the managed collections. Could you please
check by outputting xxx.getClass().getName() somewhere?
I do not know much about OJB's implementation of OTM,
so I can only guess from what I know about other JDO/ODMG
implementations.
see below.
> > Can you post the code that you use
> The Test: (one and two are created in the setup and removed in the
> teardown)
> -------------------------
> public void testRequestFriend() throws Exception
> {
> Unit unit = Unit.begin();
> one = UserRepository.findById(one.getId(), unit);
> two = UserRepository.findById(two.getId(), unit);
> one.addFriend(two);
If 'one' is a non-manageable collection, such as Vector,
then 'one' does not get marked as dirty, so it won't be
stored.
(Just a guess, maybe someelse can tell you more exactly.)
> unit.commit();
>
> TestTools.clearCache();
>
> unit = Unit.begin();
> one = UserRepository.findById(one.getId(), unit);
> List friends = one.getFriends();
> Assert.assertEquals(1, one.getFriends().size());
> // This
> Assertion Fails
> unit.commit();
> }
Olli
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]