Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Update all dbix related rows?

by uG (Scribe)
on Mar 29, 2010 at 23:24 UTC ( #831733=perlquestion: print w/ replies, xml ) Need Help??
uG has asked for the wisdom of the Perl Monks concerning the following question:

I have two dbix::class schemas who have a has_many and belongs_to relationship. Lets sat A has_many B and B belongs_to A. How do I update B, as well as the A row that it belongs to with just one update statement?

Comment on Update all dbix related rows?
Replies are listed 'Best First'.
Re: Update all dbix related rows?
by snopal (Pilgrim) on Mar 30, 2010 at 13:39 UTC

    You should use a transaction, not a single insert.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://831733]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2015-08-31 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (358 votes), past polls