How is the correct way to have p6spy to display all the sql's?

        I have configured the correct driver in the file spy.properties and have 
redirect the the property apender to 
appender=com.p6spy.engine.logging.appender.StdoutLogger. But it still do not send the 
Sql's to the stdout...

        What more do I need to configure?

        Hugs,
        MMAGNO

-----Original Message-----
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
Sent: segunda-feira, 16 de junho de 2003 15:28
To: OJB Users List
Subject: Re: addLessThan or addBetween with Dates in mySQL


hi aaron,

you can use p6spy to log all the sql.
btw it works with my installation:

        QueryByCriteria query;
        Criteria crit;
        Date d1, d2;
       
        d1 = new Date(70,0,1);
        d2 = new Date(77,0,1);
       
        crit = new Criteria();
        crit.addBetween("geburtsDatum", d1, d2);
        query = new QueryByCriteria(Person.class, crit);
        query.addOrderByAscending("geburtsDatum");
        broker.getCollectionByQuery(query);

...
       <field-descriptor
         name="geburtsDatum"
         column="gebDat"
         jdbc-type="DATE"
         
conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlDateFieldConversion"
      />
...

p6spy output:
SELECT 
A0.isBoss,A0.gebDat,A0.idTest,A0.entryDate,A0.adresse,A0.idPartner,A0.name,A0.test,A0.vorname,A0.id
 
FROM tabPerson A0 WHERE A0.gebDat BETWEEN  ? AND ?  ORDER BY 2

p6spy output with filed variables:
SELECT 
A0.isBoss,A0.gebDat,A0.idTest,A0.entryDate,A0.adresse,A0.idPartner,A0.name,A0.test,A0.vorname,A0.id
 
FROM tabPerson A0 WHERE A0.gebDat BETWEEN  '1970-01-01' AND 
'1977-01-01'  ORDER BY 2


hth
jakob

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

Reply via email to