#1567: SoftDelete and $query->count() doesn't work
-----------------------------------+----------------------------------------
 Reporter:  enrico                 |       Owner:  jwage
     Type:  defect                 |      Status:  new  
 Priority:  blocker                |   Milestone:  1.1.0
Component:  Behaviors              |     Version:  1.0.3
 Keywords:                         |    Has_test:  0    
 Mystatus:  Pending Core Response  |   Has_patch:  0    
-----------------------------------+----------------------------------------
 Hi,

 I'm using the SoftDelete feature and the 1.1 branch. The following code
 produce an error:

 {{{
 $query = Doctrine_Query::create();
 $query->from('Project');
 $query->count();
 }}}

 Generated SQL-Statement:

 {{{
 ERROR:  invalid input syntax for type boolean: ""
 STATEMENT:  SELECT COUNT(DISTINCT "v"."id") AS num_results
   FROM "projects" "v" WHERE "v"."deleted" = $1 GROUP BY "v"."id"
 }}}

 YAML-Definition for the model:

 {{{
 Project:
   tableName: projects
   columns:
     id:
       type: integer(4)
       primary: true
     name:
       type: string
       notnull: true
     deleted:
       type: boolean(1)
       notnull: true
       default: 'false'
   actAs: [SoftDelete]
 }}}

 May this is based on fixing ticket #1480.

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1567>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to