[Dbix-class] emulating (or using) MySQL's INSERT...ON DUPLICATE KEY UPDATE...
Daniel Westermann-Clark
daniel at acceleration.net
Fri Jun 23 15:46:11 CEST 2006
On 2006-06-22 21:22:51 -0700, Mark Hedges wrote:
> I see from ResultSet.pm that it does try to find the row first, and
> then it decides whether to update or create.
>
> So in a multi-connection (possibly multi-server) environment,
> update_or_create cannot be used reliably.
Would a transaction help here?
> This is just food for though I guess, whether it's worth it or not
> to attempt to extend vendor-specific statements to that level of the
> DBIC code.
My understanding from Matt was that Storage-specific hooks for
update_or_create are a good idea, but I don't think anyone has done
the work yet.
--
Daniel Westermann-Clark
More information about the Dbix-class
mailing list