Thomas,

Thanks for the reply.  I was able to get it to work by adding
auto-update=true to the B's reference descriptor for A.  I am having
another problem when I try to do this with 3 classes.  I have the problem
in a nother thread on the mailing list if you could look at it for me.

-chris worley

> Hi Christopher,
>
> Christopher C Worley wrote:
>>
>> Is it possible for ojb to insert records for both classes involved in an
>> extent?
>
> Yes, that's possible, I think there are also use cases testing the
> insert into multiple tables.
>
>> I have the classes mapped as they are in this example
>> (http://db.apache.org/ojb/tutorial3.html#mapping%20classes%20on%20multiple%20joined%20tables).
>> The problem i am having is that B gets stored and no record for A.
>
> Mhh, that's strange... I think there is a problem with your
> repository.xml.
> Could you please post the relevant sections of your persistent classes
> and the repository entries?
>
>> Also, i noticed that the primary key for B skips each time as if A has
>> also generated a key.
>
> That's the expected behaviour. The sequence manager maintains unique
> primary key values across all classes in an extent. This is done to
> avoid to have two objects belomging to the same extent in two tables
> that share the same PK.
>
> cheers,
> Thomas
>
>> -chris worley
>>
>>
>> ---------------------------------------------------------------------
>> 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]
>
>


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

Reply via email to