You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Fred Gerson <fr...@wrath.forked.net> on 2003/03/16 00:41:05 UTC

Re: order by column problem (fwd)

Hey Eric,

Thanks again for your help. Per your request, attached below is my schema.
I can't seem to get addAscendingOrderByColumn() working on either of these
tables. Any strategies you would suggest for debugging? (Again I'm using
torque 3.0 that came with tdk 2.2)

Thanks,
Fred


<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://jakarta.apache.org/turbine/dtd/database.dtd">
<!-- Autogenerated by JDBCToXMLSchema! -->
<database>
    <table name="Affinityinfo">
        <column name="Afinfid" primaryKey="true"
            required="true" type="INTEGER"/>
        <column default="" name="Clientnumber" size="255" type="VARCHAR"/>
        <column default="" name="Cycle" size="255" type="VARCHAR"/>
        <column default="" name="Blocklogo" size="255" type="VARCHAR"/>
        <column default="" name="Clientref" size="255" type="VARCHAR"/>
        <column default="" name="Clientnamedifferent" size="255" type="VARCHAR"/>
        <column default="" name="Clientname" size="255" type="VARCHAR"/>
        <column default="" name="Signername" size="255" type="VARCHAR"/>
        <column default="" name="Signertitle" size="255" type="VARCHAR"/>
        <column default="" name="Phonenumber" size="255" type="VARCHAR"/>
        <column default="" name="Weblink" size="255" type="VARCHAR"/>
        <column default="" name="Maelig" size="255" type="VARCHAR"/>
        <column default="" name="Gsppct" size="255" type="VARCHAR"/>
        <column default="" name="Usr" size="255" type="VARCHAR"/>
        <column default="" name="Timestamp" size="255" type="VARCHAR"/>
        <column default="" name="Address" size="255" type="VARCHAR"/>
    </table>
    <table name="Changes">
        <column name="Changeid" primaryKey="true"
            required="true" type="INTEGER"/>
        <column default="" name="User" size="255" type="VARCHAR"/>
        <column default="" name="Changetable" size="255" type="VARCHAR"/>
        <column default="" name="Changecolumn" size="255" type="VARCHAR"/>
        <column default="" name="Oldval" size="255" type="VARCHAR"/>
        <column default="" name="Newval" size="255" type="VARCHAR"/>
	<column name="Primkey" size="255" type="VARCHAR"/>
        <column default="" name="Address" size="255" type="VARCHAR"/>
        <column default="" name="Timestamp" size="255" type="VARCHAR"/>
    </table>
</database>

---------- Forwarded message ----------
Date: Thu, 13 Mar 2003 03:04:17 -0800 (PST)
From: Fred Gerson <fr...@wrath.forked.net>
To: Eric Emminger <er...@ericemminger.com>
Cc: Turbine Torque Users List <to...@db.apache.org>
Subject: Re: order by column problem

Hey Eric,

Thank you very much for your reply. I tried your suggestion below (for
both the CYCLE and the CLIENTNUMBER columns) but still got the same
problem.

Any suggestions of where I can start to look to try and debug?

Thanks a lot,
Fred


On Wed, 12 Mar 2003, Eric Emminger wrote:

> The addAscendingOrderByColumn() method works for me, although I only use
> it once on a single Criteria. Does it work for you if you use it just
> once, as below?
>
> Criteria criteria = new Criteria();
> criteria.addAscendingOrderByColumn(AffinityinfoPeer.CYCLE);
> //criteria.addAscendingOrderByColumn(AffinityinfoPeer.CLIENTNUMBER);
> return AffinityinfoPeer.doSelect(criteria);
>
> Eric
>



Re: order by column problem (fwd)

Posted by Fred Gerson <fr...@wrath.forked.net>.
Eric,

That did the trick, thanks!

I'm also going to check out P6Spy, looks pretty cool.

Thanks a bunch!

Fred



On Mon, 17 Mar 2003, Eric Emminger wrote:

> Fred
>
> >><?xml version="1.0"?>
> >><!DOCTYPE database SYSTEM "http://jakarta.apache.org/turbine/dtd/database.dtd">
> >><!-- Autogenerated by JDBCToXMLSchema! -->
> >><database>
>
> Try setting the name attribute for database. That was a change from 2.1
> to 2.2 that caused more than a few problems.
>
> Other than that, make sure you have logging levels set to DEBUG. You
> could surround the code in a try-catch block and catch an Exception.
> This should be working for you, so I'm trying to think of a way to find
> the problem. You might even try P6Spy to inspect the SQL going to the
> database.
>
> What database server are you using?
>
> Eric
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


Re: order by column problem (fwd)

Posted by Eric Emminger <er...@ericemminger.com>.
Fred

>><?xml version="1.0"?>
>><!DOCTYPE database SYSTEM "http://jakarta.apache.org/turbine/dtd/database.dtd">
>><!-- Autogenerated by JDBCToXMLSchema! -->
>><database>

Try setting the name attribute for database. That was a change from 2.1 
to 2.2 that caused more than a few problems.

Other than that, make sure you have logging levels set to DEBUG. You 
could surround the code in a try-catch block and catch an Exception. 
This should be working for you, so I'm trying to think of a way to find 
the problem. You might even try P6Spy to inspect the SQL going to the 
database.

What database server are you using?

Eric


Re: order by column problem (fwd)

Posted by Fred Gerson <fr...@wrath.forked.net>.
I just did some more testing regarding the below
add[Ascending|Descending]OrderByColum() problem and I want to report the
method works beautifully when it's passed an INTEGER column. When I pass
it a VARCHAR column I still nothing back.  (when I was using tdk2.1
I passed VARCHAR columns no problem though) Anyone know what might have
broke (or where I can look).

Thanks,
Fred



On Sat, 15 Mar 2003, Fred Gerson wrote:

> Hey Eric,
>
> Thanks again for your help. Per your request, attached below is my schema.
> I can't seem to get addAscendingOrderByColumn() working on either of these
> tables. Any strategies you would suggest for debugging? (Again I'm using
> torque 3.0 that came with tdk 2.2)
>
> Thanks,
> Fred
>
>
> <?xml version="1.0"?>
> <!DOCTYPE database SYSTEM "http://jakarta.apache.org/turbine/dtd/database.dtd">
> <!-- Autogenerated by JDBCToXMLSchema! -->
> <database>
>     <table name="Affinityinfo">
>         <column name="Afinfid" primaryKey="true"
>             required="true" type="INTEGER"/>
>         <column default="" name="Clientnumber" size="255" type="VARCHAR"/>
>         <column default="" name="Cycle" size="255" type="VARCHAR"/>
>         <column default="" name="Blocklogo" size="255" type="VARCHAR"/>
>         <column default="" name="Clientref" size="255" type="VARCHAR"/>
>         <column default="" name="Clientnamedifferent" size="255" type="VARCHAR"/>
>         <column default="" name="Clientname" size="255" type="VARCHAR"/>
>         <column default="" name="Signername" size="255" type="VARCHAR"/>
>         <column default="" name="Signertitle" size="255" type="VARCHAR"/>
>         <column default="" name="Phonenumber" size="255" type="VARCHAR"/>
>         <column default="" name="Weblink" size="255" type="VARCHAR"/>
>         <column default="" name="Maelig" size="255" type="VARCHAR"/>
>         <column default="" name="Gsppct" size="255" type="VARCHAR"/>
>         <column default="" name="Usr" size="255" type="VARCHAR"/>
>         <column default="" name="Timestamp" size="255" type="VARCHAR"/>
>         <column default="" name="Address" size="255" type="VARCHAR"/>
>     </table>
>     <table name="Changes">
>         <column name="Changeid" primaryKey="true"
>             required="true" type="INTEGER"/>
>         <column default="" name="User" size="255" type="VARCHAR"/>
>         <column default="" name="Changetable" size="255" type="VARCHAR"/>
>         <column default="" name="Changecolumn" size="255" type="VARCHAR"/>
>         <column default="" name="Oldval" size="255" type="VARCHAR"/>
>         <column default="" name="Newval" size="255" type="VARCHAR"/>
> 	<column name="Primkey" size="255" type="VARCHAR"/>
>         <column default="" name="Address" size="255" type="VARCHAR"/>
>         <column default="" name="Timestamp" size="255" type="VARCHAR"/>
>     </table>
> </database>
>
> ---------- Forwarded message ----------
> Date: Thu, 13 Mar 2003 03:04:17 -0800 (PST)
> From: Fred Gerson <fr...@wrath.forked.net>
> To: Eric Emminger <er...@ericemminger.com>
> Cc: Turbine Torque Users List <to...@db.apache.org>
> Subject: Re: order by column problem
>
> Hey Eric,
>
> Thank you very much for your reply. I tried your suggestion below (for
> both the CYCLE and the CLIENTNUMBER columns) but still got the same
> problem.
>
> Any suggestions of where I can start to look to try and debug?
>
> Thanks a lot,
> Fred
>
>
> On Wed, 12 Mar 2003, Eric Emminger wrote:
>
> > The addAscendingOrderByColumn() method works for me, although I only use
> > it once on a single Criteria. Does it work for you if you use it just
> > once, as below?
> >
> > Criteria criteria = new Criteria();
> > criteria.addAscendingOrderByColumn(AffinityinfoPeer.CYCLE);
> > //criteria.addAscendingOrderByColumn(AffinityinfoPeer.CLIENTNUMBER);
> > return AffinityinfoPeer.doSelect(criteria);
> >
> > Eric
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>