Thanks,
I changed it already.
And I found the critical error. It was on the DATE field. I wasn't using
the "conversion" (and it works with mysql)
conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlDateFi
eldConversion"
Now its fine.
Glauber
----- Original Message -----
From: "Jakob Braeuchi" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Friday, June 13, 2003 4:24 PM
Subject: Re: HSQLDB problems
> hi glauber,
>
> imo the columns defined as int(7) are the problem. according to hsqldb
> doc BIGINT is used for long.
>
> hth
> jakob
>
> Glauber Andrade wrote:
>
> >Hi,
> >
> >I was using Mysql and everything works fine.
> >Now i am changing to Hsqldb and i got some problems.
> >When I try to get the object "NotaRecibo" i got the exception:
java.sql.SQLException: Wrong data type
> >What could be wrong ? "create table"? "class-descriptor" ? "object
definition" ?
> >PLEASE
> >
> >Thanks,
> >
> >Glauber
> >
>
>---------------------------------------------------------------------------
--
> > <class-descriptor
> > class="c.m.s.d.NotaRecibo"
> > table="notasrecibos"
> > >
> > <field-descriptor
> > name="id"
> > column="id"
> > jdbc-type="BIGINT"
> > primarykey="true"
> > autoincrement="true"
> > />
> > <field-descriptor
> > name="id_prestador"
> > column="prestador"
> > jdbc-type="BIGINT"
> > />
> > <reference-descriptor
> > name="prestador"
> > class-ref="c.m.s.d.Prestador"
> > >
> > <foreignkey field-ref="id_prestador"/>
> > </reference-descriptor>
> > <field-descriptor
> > name="id_servico"
> > column="servico"
> > jdbc-type="INTEGER"
> > />
> > <reference-descriptor
> > name="servico"
> > class-ref="c.m.s.d.ServicoJuridico"
> > >
> > <foreignkey field-ref="id_servico"/>
> > </reference-descriptor>
> > <field-descriptor
> > name="data"
> > column="DATA"
> > jdbc-type="DATE"
> > />
> > <field-descriptor
> > name="valor"
> > column="VALOR"
> > jdbc-type="DOUBLE"
> > />
> > <collection-descriptor
> > name="excessoes"
> > element-class-ref="c.m.s.d.NotaRecibo_Excessao"
> > auto-retrieve="true"
> > auto-update="true"
> > auto-delete="true"
> > refresh="true"
> > >
> > <inverse-foreignkey field-ref="id_notaRecibo"/>
> > </collection-descriptor>
> > </class-descriptor>
>
>---------------------------------------------------------------------------
--
> >public class NotaRecibo {
> > private long id;
> > private Prestador prestador;
> > private ServicoJuridico servico;
> > private Date data;
> > private double valor;
> > private long id_prestador;
> > private int id_servico;
> > private Vector excessoes;
>
>---------------------------------------------------------------------------
--
> >CREATE TABLE notasrecibos (" +
> > "id INTEGER IDENTITY," +
> > "prestador INT(7) NOT NULL," +
> > "servico INT(7) NOT NULL," +
> > "valor FLOAT(8,2) NOT NULL," +
> > "data DATE NOT NULL," +
> > "FOREIGN KEY (prestador) REFERENCES Prestadores(id),"+
> > "FOREIGN KEY (servico) REFERENCES
ServicosJuridico(id))"
> >);
>
>---------------------------------------------------------------------------
--
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> 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]