AND is generated, but I wrote $c->addOr in condition

Discussion relating to version 1.3.x and 1.4.x

AND is generated, but I wrote $c->addOr in condition

Postby mstdmstd » Wed Jul 17, 2013 9:47 am

Hi,
In Symfony 1.4 propel I add condition :
Code: Select all
         $UniquesSku_Join_Cond = $c->getNewCriterion(UniquesSkuListPeer::SKU, " ( uniques_sku_list.SKU = inventory_item.SKU and uniques_sku_list.UNIQUE_SESSION_ID= '"
            .$extended_parameters['parent_items_array_unique_session_id'] . "' and inventory_item.matrix= 1 ) ", Criteria::CUSTOM);
         $c->addOr( $UniquesSku_Join_Cond );

But in debug I see sql :
Code: Select all
         ... AND  ( uniques_sku_list.SKU = inventory_item.SKU and uniques_sku_list.UNIQUE_SESSION_ID= '6tabrkns8isf0tl3phu64cj1o6_1374046544' and
inventory_item.matrix= 1 )
Condition with ADD is generated but, but I need OR and I wrote :
Code: Select all
         $c->addOr

How to fix it ?
mstdmstd
Member
 
Posts: 81
Joined: Sun Sep 21, 2008 10:38 am
Location: Donetsk, Ukraine

Re: AND is generated, but I wrote $c->addOr in condition

Postby mstdmstd » Fri Jul 19, 2013 1:44 pm

Do somebody have any idea as for this problem ?
mstdmstd
Member
 
Posts: 81
Joined: Sun Sep 21, 2008 10:38 am
Location: Donetsk, Ukraine


Return to symfony 1.3 and 1.4

Who is online

Users browsing this forum: Bing [Bot] and 2 guests