John Siracusa wrote:
> On 12/15/06, Christopher H. Laco <[EMAIL PROTECTED]> wrote:
>> When deleting an object, one can pass the cascade option so it will
>> delete all child objects in a relationship. In my case, passing cascade
>> to the cart object, will delete the cart and all of it's related items:
>>
>>   $cart->delete(cascade => 1);
>>
>> Is there a way to do this same thing when delete multiple objects using
>> Object Manager?
>>
>>   R::D::O::Manager->delete_objects(
>>     object_class => 'Carts',
>>     where => [status => 0],
>>   )
> 
> Yeah, it's called ON DELETE CASCADE in your database :)

Right...because all databases support the same things and work the same
way. :-)

Will cascade work if I load the carts with just their pk/fk columns, and
set with_objects to {} so they don't load the items?

-=Chris

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to