Hi again,

Peter Rajsky wrote:
Hi Thomas,
Thanks a lot [actually I could imagine better place where to inform
about such important thing than comparison of PB and ODMG API in
faq.html :)].
are you volunteering to improve the docs? all help is welcome!

I have probably similar problem. Don't you know if it is the same
problem?

I have 1:n association between classes A and B. I do the following:
1) I find one instance of A
2) I find n instances of B
3) I set collection of instances of class B to instance of A.
4) I store instance of A.

There are no updates on the table corresponding to class B (foreign
key should be changed!).


OJB provides automatic propagation of foreign keys. But it does only work if the foreign key attributes of the B instance are set to 0 or null.
(This is done to avoid data corruption)
If you are loading B instances that already have a FK filled with a non-zero or non-null value, you have to set the FK attributes explicitely!

cheers,
Thomas

Thanks a lot, pr.

-----Puvodni zprava-----
Od: Thomas Mahler [mailto:[EMAIL PROTECTED]]
Odeslano: 29. novembra 2002 0:56
Komu: OJB Users List
Predmet: Re: 1:n aggregation problem


Hi Peter,

This is not a bug, but works as designed. You have to delete the address
explicitely.
Please refer to the faq.html (comparison of PB and ODMG API) for details.

cheers,
Thomas

Peter Rajsky wrote:

Hello,
I have the following problem (I tried also new sources from CVS):

I have 1:n aggregation between Company and Address. I do the following:
1) I find one company
1) I delete one address from the collection of aggregated addresses
2) I store the company
The problem is, that corresponding address record is not deleted from the
database (I took a look at a log and there is was no DELETE statement).

Inserting and updating addresses is working correctly.

Don't you have any patch? Thanks a lot, pr

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to