hi caster,

i cannot reproduce your problem.

...
<field-descriptor id="5"
         name="geburtsDatum"
         column="gebDat"
         jdbc-type="DATE"

conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlDateFi
eldConversion"
/>
<field-descriptor id="7"
         name="boss"
         column="isBoss"
         jdbc-type="BIT"
/>
...

crit = new Criteria();
crit.addNotNull("geburtsDatum");
crit.addEqualTo("boss", new Boolean(true));
query = new QueryByCriteria(Person.class, crit);

this produces the following sql:

SELECT
A0.isBoss,A0.gebDat,A0.idTest,A0.entryDate,A0.adresse,A0.idPartner,A0.name,A
0.test,A0.vorname,A0.id FROM tabPerson A0 WHERE (A0.gebDat IS NOT NULL ) AND
A0.isBoss = ?

attribute names are correctly traslated into column names as you can see
(geburtsDatum -> gebDat , boss -> isBoss).

jakob

----- Original Message -----
From: "casterx" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 30, 2002 8:13 PM
Subject: Huge QueryByCriteria bug (or design change)?


> After porting my app from OJB .9 to .9.5, I noticed that my
QueryByCriteria
> no longer work properly. I was able to trace down the problem to the lack
of
> the translation of the class fieldname to table column name. For example:
>
> <field-descriptor id="1"
>  name="firstName"
>  column="first_name"
>  jdbc-type="VARCHAR"/>
>
>
> In .9, the following worked, criteria.addLike("firstName","caster"); and
> firstName was translated to first_name in the select statement.
>
> However, in .9.5, I have to write
>
> criteria.addLike("first_name","caster");
>
> I think .9.4, worked like .9
>
> Thanks
> Caster
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to