Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Issues with BasePeer::doCount()

propel
Discussion topic

Back to topic list

Issues with BasePeer::doCount()

Reply

Author Dustin Whittle <dustin dot whittle at symfony-project dot com>
Full name Dustin Whittle <dustin dot whittle at symfony-project dot com>
Date 2008-02-14 15:06:42 PST
Message All,

In BasePeer::doCount there is a call to clearSelectColumns() to replace with
a count(*), this results in the loss of the table name and makes doCount
calls fail with a sql error.

I have fixed with a hack:

<code>
$columns = $criteria->getSe​lectColumns(); // assumes pk is idx
$criteria->clear​SelectColumns()->​addSelectColumn('COU​NT('.$columns[0].')​');
</code>

This is based on latest 1.3-dev. Is the unstable refactor still happening or
are the major changes already committed?


- Dustin


PS: I tried to create a new ticket, but it was rejected as spam and forgot
my trac password.. Hans can you reset my password and send to me off list?
Attachments

« Previous message in topic | 1 of 13 | Next message in topic »

Messages

Show all messages in topic

Issues with BasePeer::doCount() Dustin Whittle <dustin dot whittle at symfony-project dot com> Dustin Whittle <dustin dot whittle at symfony-project dot com> 2008-02-14 15:06:42 PST
     Re: [propel-dev] Issues with BasePeer::doCount() hlellelid Hans Lellelid 2008-02-19 14:58:02 PST
         Re: [propel-dev] Issues with BasePeer::doCount() hlellelid Hans Lellelid 2008-02-19 15:26:23 PST
             Re: [propel-dev] Issues with BasePeer::doCount() Dustin Whittle <dustin dot whittle at symfony-project dot com> Dustin Whittle <dustin dot whittle at symfony-project dot com> 2008-02-19 15:46:18 PST
                 Re: [propel-dev] Issues with BasePeer::doCount() hlellelid Hans Lellelid 2008-02-19 16:51:57 PST
                     Re: [propel-dev] Issues with BasePeer::doCount() Dustin Whittle <dustin dot whittle at symfony-project dot com> Dustin Whittle <dustin dot whittle at symfony-project dot com> 2008-02-19 17:11:09 PST
                         Re: [propel-dev] Issues with BasePeer::doCount() hlellelid Hans Lellelid 2008-02-19 17:28:46 PST
                             Re: [propel-dev] Issues with BasePeer::doCount() Dustin Whittle <dustin dot whittle at symfony-project dot com> Dustin Whittle <dustin dot whittle at symfony-project dot com> 2008-02-19 17:40:44 PST
                                 addCountConstants replacement? "Tomasz P dot Kotecki" <tomek at realtsp dot com> "Tomasz P dot Kotecki" <tomek at realtsp dot com> 2008-02-22 07:22:02 PST
                                     Re: [propel-dev] addCountConstants replacement? hlellelid Hans Lellelid 2008-02-22 07:42:32 PST
                                         Re: [propel-dev] addCountConstants replacement? "Tomasz P dot Kotecki" <tomek at realtsp dot com> "Tomasz P dot Kotecki" <tomek at realtsp dot com> 2008-02-22 07:51:29 PST
                                             Re: [propel-dev] addCountConstants replacement? hlellelid Hans Lellelid 2008-02-22 07:52:49 PST
                                                 Re: [propel-dev] addCountConstants replacement? "Tomasz P dot Kotecki" <tomek at realtsp dot com> "Tomasz P dot Kotecki" <tomek at realtsp dot com> 2008-02-22 08:32:25 PST
Messages per page: