#1567: $query->count() doesn't work
------------------------+---------------------------------------------------
Reporter: enrico | Owner: jwage
Type: defect | Status: new
Priority: blocker | Milestone: Unknown
Component: Behaviors | Version:
Resolution: | Keywords:
Has_test: 0 | Mystatus: Pending Core Response
Has_patch: 0 |
------------------------+---------------------------------------------------
Changes (by jwage):
* version: 1.0.3 =>
* milestone: 1.1.0 => Unknown
Comment:
I tested this a bit, and in order for it to work it must be:
{{{
$query = Doctrine_Query::create();
$query->from('Ticket_1567_Project p');
$query->addWhere('p.user_id = ?', 1);
$query->addWhere('p.deleted = ?', 0); // or 1
}}}
I think the issue is that just doing boolean false will evaluate to a
blank string in php, whereas boolean true will evaluate to 1. So (boolean)
true and (string) 'false' work but (boolean) false does not. (int) 0 or
(int) 1 will work as well since those are the values stored by the dbms.
My first thought was that we should be doing type conversions on the query
parameters but I am not sure if that is possible or if we should consider
doing that. We'll have to discuss this further.
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1567#comment:4>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---