I have a model involving bidirectional relationships, and I have a question regarding their implementation. I am not sure wether we are misunderstanding the APIs, or if there is a problem with TopLink.
We've tried different approaches and mappings, but it seems to boil down to this: A bidirectional relationship is not updated on both sides/ends in the object cache unless we explicitly do so programmatically in the code, like so:
a.add(Someobject b);
b.setOwner(a);
If we dont explicitly do it like this, the relation is correctly persisted to the database tables, but the object cache does not reflect the change on both sides - unless we re-read the involved objects from database.
I'm referring to the same issue as discussed in these older threads:
281301
873869
Are there any news on this matter in current versions of TopLink? I see the disadvantages of using bidirectional relationships, but still it "is supposed to work".
I'd appreciate any input on this :)
Regards,
Jon B