Hi,

The problem is probably caused by your Torque configuration file where you
have to define the following property:

torque.database.your-project-name.adapter=mysql

and change "your-project-name" with the name of your project (cfr
"bookstore" in the torque tutorial)

hope this helps you...
Maarten

On Thu, 15 Aug 2002 [EMAIL PROTECTED] wrote:

> Hi,
> 
> I am starting to migrate to Torque 3 b3 from b2 and I found that the Criteria 
>objects doesn't work any more if I am testing for a boolean value. E.g. with the 
>following code,
> 
> Criteria crit = new Criteria();
> crit.add(MyObjPeer.DELETED, false);
> System.out.println(crit.toString()); // in actual case i am doing a 
>MyObjPeer.doSelect(crit);
> 
> I got an NullPointerException, 
> 
> java.lang.NullPointerException
>         at org.apache.torque.util.SqlExpression.build(SqlExpression.java:291)
>         at org.apache.torque.util.Criteria$Criterion.appendTo(Criteria.java:3432)
>         at org.apache.torque.util.Criteria$Criterion.toString(Criteria.java:3573)
>         at org.apache.torque.util.Criteria.toString(Criteria.java:1857)
> 
> It would be the same case if I used Boolean.FALSE instead of "false". However, if I 
>used
> 
> crit.add(MyObjPeer.DELETED, 0);
> 
> then everything would be fine. Does it mean that I can't use boolean type anymore?
> 
> I am using MySQL and the DELETED column was defined as type="BIT" in the schema, 
>although I tried type="BOOLEANINT" also.
> 
> best regards,
> Terence
> ----------------------------------------------
>  �w��ϥ�HongKong.com�l��t��
>  Thank you for using hongkong.com Email system
> 
> 
> --
> 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