Hi Brian,

Brian Latimer wrote:
Armin,

I have tried my code with rc7 and I still have the problem I described.

Looking at the test case you have written, it seems to produce the results I would like. That is, your code does not return null objects for objects that should be retrieved via anonymous foreign keys contained within nested objects.

The only major difference I have seen between your test case and my code thus far is that you have a reference to a "Person" within the PersonDetail.

This shouldn't be a problem. In the test I set auto-retrieve to false for this reference. But I will try to run the test without the reference to be sure.





public static class PersonDetail implements PersonDetailIF
{
Integer id;
String profile;
Person person; // <------------------------- I don't have this reference
GenderIF gender;
...


I tried adding a reference like you have but ended up with the same results that I had without such a reference.

My code looks very much like your test case, but I still get nulls on my nested objects if I use anonymous keys and turn proxies off.
While I think you have shown that the problems must be with my code somewhere, I'm certainly baffled as to what might be wrong.


I am using PersistentFieldIntrospectorImpl and most of my properties are private, do you suppose that would cause a problem on nested objects?


I run PrimaryKeyForeignKeyTest.java with PersistentFieldIntrospectorImpl but all tests pass, thus it seems that this isn't the problem.


A difference between your test and PrimaryKeyForeignKeyTest is that you using another SequenceManager to generate the PK values (assume you are using SequenceManagerNativeImpl, because PK was set to 'readonly'). I don't know if this could be a problem, maybe you try to run your test with another SequenceManager (e.g. SequenceManagerInMemoryImpl and non Identity column for PK).

regards,
Armin


Thank you very much for looking into this for me.
Brian

At 08:58 AM 06/12/2004, Armin Waibel wrote:

Hi Brian,

I tried to reproduce your problem (with latest from CVS) without success. A new test case was added to test suite ([db-ojb]/src/test/org/...) called PrimaryKeyForeignKeyTest.java, the mapping is declared in repository_junit_reference.
Please have a look at this test, does it reproduce your problem?


regards,
Armin




---------------------------------------------------------------------
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