Hi Steve,

[EMAIL PROTECTED] wrote:
I'm still having trouble with the collection stuff I asked about last week, and now a new problem:

I use anonymous keys for essentially all of my references.

Do you use it for all 1:1 references or generally in all references?


With the required-for-ODMG setting of auto-update="none", it appears that OJB never sets the anonymous keys from the values in the referenced objects: It is always inserting null into the FK column.


Are you sure that all anonymous keys be ignored or only these in conjunction with 1:n relations? If the FK wasn't anonymous the test pass?
I ask because there is a bug in handling of new n-side objects of 1:n relations. The linking for new objects is not done. But this is independent of the field type (anonymous on/off).


Please try to patch ObjectEnvelopeTable#cascadeInsertCollectionReferences
in line 666 replace

else
{
   // we mark collection reference for linking
   oe.addLinkOneToN(col, source.getObject(), false);
}

with

else
{
   // we mark collection reference for linking
   oe.addLinkOneToN(col, source.getObject(), false);
   oe.setModificationState(oe.getModificationState().markDirty());
}

This should fix problems with new added objects in 1:n relations.


Should I just give up on 1.0.3, or am I missing something?


I'm strongly interested in fixing all issues in odmg. The problem is that I can only run against the OJB test-suite (all these tests pass for 1.0.3). Please report all issues to jira if possible with some kind of test case to reproduce the bug. I will try to fix this stuff till next release.


regards,
Armin


-steve

Steve Clark
ECOS Development Group
[EMAIL PROTECTED]
(970)226-9291


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




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



Reply via email to