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 Glauber Andrade <gl...@maximasti.com.br> on 2003/06/08 19:39:18 UTC
Collection's problems
Hi,
I have a object with three collections. When I create the object (and the
objects for the collections) and I try to use it, the collections are null,
but the objects are in the DB.
Only when I restart the system the collections appears.
What do I need to do? PLEASE.
THANKS,
Glauber Andrade
> <class-descriptor
> class="com.maximas.sisret.data.PFisica"
> table="PFisicas"
> >
> <field-descriptor
> name="id"
> column="id"
> jdbc-type="BIGINT"
> primarykey="true"
> autoincrement="true"
> />
> <field-descriptor
> name="exp"
> column="EXP"
> jdbc-type="VARCHAR"
> />
> <field-descriptor
> name="pis"
> column="PIS"
> jdbc-type="VARCHAR"
> />
> <collection-descriptor
> name="pagadoras"
> element-class-ref="com.maximas.sisret.data.Pagadora"
> auto-retrieve="true"
> auto-update="true"
> auto-delete="true"
> orderby="nome"
> sort="DESC"
> >
> <inverse-foreignkey field-ref="id_pfisica"/>
> </collection-descriptor>
> <collection-descriptor
> name="salarios"
> element-class-ref="com.maximas.sisret.data.Salario"
> auto-retrieve="true"
> auto-update="true"
> auto-delete="true"
> orderby="data"
> sort="DESC"
> >
> <inverse-foreignkey field-ref="id_pfisica"/>
> </collection-descriptor>
>
> <collection-descriptor
> name="indiretos"
> element-class-ref="com.maximas.sisret.data.Indireto"
> auto-retrieve="true"
> auto-update="true"
> auto-delete="true"
> orderby="data"
> sort="DESC"
> >
> <inverse-foreignkey field-ref="id_pfisica"/>
> </collection-descriptor>
> </class-descriptor>
>
> <!-- Definitions for com.maximas.sisret.data.Pagadora -->
> <class-descriptor
> class="com.maximas.sisret.data.Pagadora"
> table="Pagadoras"
> >
> <field-descriptor
> name="id"
> column="id"
> jdbc-type="BIGINT"
> primarykey="true"
> autoincrement="true"
> />
> <field-descriptor
> name="id_pfisica"
> column="id_pfisica"
> jdbc-type="BIGINT"
> />
> <reference-descriptor
> name="pfisica"
> class-ref="com.maximas.sisret.data.PFisica"
> >
> <foreignkey field-ref="id_pfisica"/>
> </reference-descriptor>
>
> <field-descriptor
> name="cnpj"
> column="CNPJ"
> jdbc-type="VARCHAR"
> />
> <field-descriptor
> name="nome"
> column="NOME"
> jdbc-type="VARCHAR"
> />
> <field-descriptor
> name="data"
> column="DATA"
> jdbc-type="DATE"
> />
> <field-descriptor
> name="retido"
> column="RETIDO"
> jdbc-type="DOUBLE"
> />
>
> </class-descriptor>
>
> <!-- Definitions for com.maximas.sisret.data.Salario -->
> <class-descriptor
> class="com.maximas.sisret.data.Salario"
> table="Salarios"
> >
> <field-descriptor
> name="id"
> column="id"
> jdbc-type="BIGINT"
> primarykey="true"
> autoincrement="true"
> />
> <field-descriptor
> name="id_pfisica"
> column="id_pfisica"
> jdbc-type="BIGINT"
> />
> <reference-descriptor
> name="pfisica"
> class-ref="com.maximas.sisret.data.PFisica"
> >
> <foreignkey field-ref="id_pfisica"/>
> </reference-descriptor>
>
> <field-descriptor
> name="data"
> column="DATA"
> jdbc-type="DATE"
> />
> <field-descriptor
> name="valor"
> column="VALOR"
> jdbc-type="DOUBLE"
> />
> <field-descriptor
> name="irrf"
> column="IRRF"
> jdbc-type="DOUBLE"
> />
> <field-descriptor
> name="inss"
> column="INSS"
> jdbc-type="DOUBLE"
> />
> <field-descriptor
> name="pensao"
> column="PENSAO"
> jdbc-type="DOUBLE"
> />
> <field-descriptor
> name="privada"
> column="PRIVADA"
> jdbc-type="DOUBLE"
> />
> </class-descriptor>
>
> <!-- Definitions for com.maximas.sisret.data.Indireto -->
> <class-descriptor
> class="com.maximas.sisret.data.Indireto"
> table="Indiretos"
> >
> <field-descriptor
> name="id"
> column="id"
> jdbc-type="BIGINT"
> primarykey="true"
> autoincrement="true"
> />
> <field-descriptor
> name="id_pfisica"
> column="id_pfisica"
> jdbc-type="BIGINT"
> />
> <reference-descriptor
> name="pfisica"
> class-ref="com.maximas.sisret.data.PFisica"
> >
> <foreignkey field-ref="id_pfisica"/>
> </reference-descriptor>
>
> <field-descriptor
> name="data"
> column="DATA"
> jdbc-type="DATE"
> />
> <field-descriptor
> name="valor"
> column="VALOR"
> jdbc-type="DOUBLE"
> />
> <field-descriptor
> name="reajustado"
> column="reajustado"
> jdbc-type="DOUBLE"
> />
> <field-descriptor
> name="irrf"
> column="IRRF"
> jdbc-type="DOUBLE"
> />
> <field-descriptor
> name="pago"
> column="PAGO"
> jdbc-type="INTEGER"
> />
> </class-descriptor>
>
>
>
> public class PFisica {
> private long id;
> private String exp;
> private String pis;
> private java.util.Vector pagadoras;
> private java.util.Vector salarios;
> private java.util.Vector indiretos;
> ...
> }
>
> public class Pagadora {
> private long id;
> private long id_pfisica;
> private PFisica pfisica;
> private String nome;
> private String cnpj;
> private Date data;
> private double retido;
> ...
> }
>
> public class Indireto {
> private long id;
> private long id_pfisica;
> private PFisica pfisica;
> private Date data;
> private double valor;
> private double reajustado;
> private double irrf;
> private int pago;
> ...
> }
>
> public class Salario {
> private long id;
> private long id_pfisica;
> private PFisica pfisica;
> private Date data;
> private double valor;
> private double irrf;
> private double inss;
> private double privada;
> private double pensao;
> ...
> }
>