Yes, I've done all the tests, and really doesn't work.
If someone need to use 1:1 optional (or 1:0..1), cannot use proxy. But it's
not a lose performance scenario (at least for me), since it's 1:0..1 only...
If someone could double check it, please do... It's a boring bug that can
affect others trying to use proxies with 1:0..1 mappings.

Best regards,

Edson Richter

----- Original Message ----- 
From: Edson Carlos Ericksson Richter
To: 'OJB Users List'
Sent: Friday, October 24, 2003 6:17 PM
Subject: Proxies && 1:1 optional doesn't work?


Hi! I'm using RC4 CVS Head (I get the source today, at 18:00 GMT-3).
Look sample bellow. If I make OutrasInformacoes dynamic proxy, I get an
error (method getXxx in object null) if Pessoa hasn't a db record in
TB_OUTRAS_INFORMACOES. Also, where there is no OutrasInformacoes em Pessoa,
when I use proxy=dynamic for OutrasInformacoes, executing
pessoa.getOutrasInformacoes==null results in false (in real, it's a proxy,
so it isn't null). But if there is no record, it shouldn't be a proxy. This
should be just null. If I remove "proxy=dynamic" line, the every thing works
fine.


  <class-descriptor
      class="OutrasInformacoes"
      proxy="dynamic"
      schema="MGR"
      table="TB_OUTRAS_INFORMACOES">
    <field-descriptor
        name="codigoPessoa"
        column="CO_PESSOA"
        jdbc-type="INTEGER"
        primarykey="true"
        autoincrement="false" />
    <reference-descriptor
        name="pessoa"
        proxy="false"
        class-ref="br.com.mgr.beans.PessoaFJBean">
      <foreignkey field-ref="codigoPessoa"/>
    </reference-descriptor>
</class-descriptor>

<class-descriptor
      class="Pessoa"
      proxy="dynamic"
      schema="MGR"
      table="TB_PESSOA">
    <field-descriptor
        name="codigo"
        column="CO_PESSOA"
        jdbc-type="INTEGER"
        primarykey="true"
        sequence-name="SQ_PESSOA"
        autoincrement="true" />
    <reference-descriptor
        name="outrasInformacoes"
        proxy="true"
        class-ref="br.com.mgr.beans.OutrasInformacoesBean">
      <foreignkey field-ref="codigo"/>
    </reference-descriptor>
</class-descriptor>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.530 / Virus Database: 325 - Release Date: 22/10/2003


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