[Dbix-class] What is a cascading update?

Matt S Trout dbix-class at trout.me.uk
Wed May 17 20:42:37 CEST 2006


Mark Blythe wrote:
> Hi ... While chasing down some strange behavior in my application last 
> night, I found myself in 
> DBIx:::Class::Relationship::CascadeActions::update.  Cascading deletes I 
> understand -- that's fairly common.  But an update?  While I was able to 
> work around the issue I was having, it would be helpful to understand 
> what exactly a cascading update is.
> 
> In my case, it was being triggered when I updated a parent record in a 
> might_have relationship.  Is this intended to handle any columns in the 
> related table that may have been updated via a proxied accessor in the 
> parent class?

Pretty much exactly that, yes. It does currently sometimes do an unnecessary 
SELECT though, which will be fixed in 0.06003

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list