#1480: SubQuery and SoftDelete doesn't work well together
-----------------------------------+----------------------------------------
 Reporter:  enrico                 |       Owner:  romanb
     Type:  defect                 |      Status:  new   
 Priority:  blocker                |   Milestone:  1.0.3 
Component:  Listeners              |     Version:  1.0   
 Keywords:                         |    Has_test:  0     
 Mystatus:  Pending Core Response  |   Has_patch:  0     
-----------------------------------+----------------------------------------
 Hi,

 I've a problem with two models, a subquery and the SoftDelete-Listener.
 The SoftDelete-Listener is attached to model Foo. The query looks like

 {{{
 Doctrine_Query::create()
 ->from('Foo f')
 ->addWhere('f.id NOT IN (SELECT b.foo_id FROM Bar b)')
 ->execute();
 }}}

 This will result in query:

 {{{
 SELECT "f"."id", "f"."col2"
 FROM "foo" "f"
 WHERE "f"."id" IN (SELECT "b"."foo_id" FROM "bar" "b" WHERE "s"."deleted"
 = ?) AND "s"."deleted" = ?
 }}}

 The SoftDelete column was added twice and result in the following error:

 {{{
 Doctrine_Connection_Pgsql_Exception: SQLSTATE[HY093]: Invalid parameter
 number: parameter was not defined in
 /<path>/doctrine/lib/Doctrine/Connection.php on line 1074
 }}}

-- 
Ticket URL: <http://trac.phpdoctrine.org/ticket/1480>
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