Re: How can I handle 1:1 relationships?

Armin Waibel <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Iris Soto wrote:
> Hello Armin, thanks for ask me,
> the version of OJB that i'm using is y.IndirectionHandler -1.0.4, in the 
> OJB.properties file i  have enable CGLib proxy support. I has been try 
> test pass without using proxied references, and there is nothing 
> different, the error is the same. I want to make bidirectional reference 
> even though the passport is null when make reference in person
> to passport. OJB can work with this null reference?
> 

I currently try to write a test to reproduce your problem. Could you 
post some example/pseudo code to reproduce your problem?

regards,
Armin

> Now I have:
> 
> ****************************************************************
> <class-descriptor class="org.apache.ojb.Person" table="PERSON">
>       <field-descriptor name="personId" primarykey="true" 
> nullable="false" autoincrement="true"... column="PERSON_ID" 
> jdbc-type="INTEGER"/>
>     <field-descriptor name="personName" nullable="false" 
> default-fetch="true" column="PERSON_NAME" jdbc-type="VARCHAR"/>
>       <reference-descriptor name="personIdRef" 
> class-ref="org.apache.ojb.Passport" auto-update="true" auto-delete="true">
>         <foreignkey field-ref="personId"/>
>       </reference-descriptor>
> </class-descriptor>
> ****************************************************************
> <class-descriptor class="org.apache.ojb.Passport" table="PASSPORT">
>     <field-descriptor name="personId" primarykey="true" nullable="false" 
> column="PERSON_ID" jdbc-type="INTEGER"/>
>     <field-descriptor name="passport_number" nullable="false" 
> default-fetch="true" column="PASSPORT_NUMBER" jdbc-type="VARCHAR"/>
>     <reference-descriptor name="personIdRef" 
> class-ref="org.apache.ojb.Person" auto-update="false" auto-delete="false">
>         <foreignkey field-ref="personId"/>
>       </reference-descriptor>
>   </class-descriptor>
> 
> -- 
> Iris Soto
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.