You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Robert Crawford <cr...@kloognome.com> on 2004/07/31 00:43:40 UTC

Another piece of the puzzle? (was Re: Negative Sequence Numbers?)

I double-checked the configuration of my tests and realized I was running
tests on a subclass, not the original User class that gets the wrong
sequence numbers.

So I dropped back and ran just the superclass. Everything worked fine; the
sequence numbers were assigned correctly. So the configuration's OK for
that class.

Then I ran the tests again with the subclass. This class extends the
original User class, with the extended information stored on a separate
table, joined by the primary key. The second table's reference-descriptor
is this:

<reference-descriptor name="super"
        class-ref="com.kloognome.accesscontrol.ojb.UserInstance"
        auto-retrieve="true"
        auto-update="true"
        auto-delete="true"
    >
        <foreignkey field-ref="userNbr"/>
</reference-descriptor>

This time the key's messed up.

It looks like the problem's related to the super-class relationship. Any
ideas? I'm going to try the idea of having different primary keys on each
table, with the subclass table referring to the superclass table in one of
its columns. I don't know why this would work any better, but...


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org