My repository.xml has this lines as new

In class descriptor of A:
<extent-class class-ref="x.B" />

In class descriptor of B:
<reference-descriptor name="super" class-ref="x.A"
        auto-retrieve="true"
        auto-update="true"
        auto-delete="true"
    >
        <foreignkey field-ref="idB" />
</reference-descriptor>


This is correct, isn't it?

Carles






-----Mensaje original-----
De: Stefan Schlösser [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 03 de mayo de 2004 12:52
Para: OJB Users List
Asunto: Re: inherit problem


Hi,

auto-retrieve does not require auto-increment to be set.

You likely made a misstake in your class-definitions and or repository 
declarations.

Stefan

Carles Duque wrote:

> Hello!!
>  
> I have a problem witth retrieve two classes in a two tables.
> Classes: A and B. B estends A.
>  
> When I have one class (example: A) I see if Id (getId()) is null. If its true, I do 
> "select MAX" and I assing to class (setId()). This work ok, always.
> In the new case (A and B), when I retrieve a class B, I do "select MAX", assign id, 
> but returns SQLException, because ID is null.
>  
> Is possible that if you put "auto-retrieve=true", you must use auto-increment?? Its 
> possible another solution?
>  
> Thanks!!!
>  
>  
> Carles
> 



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