[Dbix-class] Observation when providing an arrayref to update

Jess Robinson castaway at desert-island.me.uk
Fri Apr 3 23:41:04 BST 2009



On Fri, 3 Apr 2009, Jochen Luig wrote:

> Hi,
>
> yesterday I stumbled upon an interesting phenomenon when debugging an
> app.
> If you provide an array ref to the update method of a row object like
> so:
>
> $row->update({ some_column => [ "foo bar", "baz" ] });
>

[snip]

Ah but if you did upgrade "only to 012" you'd get the newer SQL::Abstract, 
which has this in its changelog:

Make col => [] and col => {$op => [] } DTRT or die instead of generating
broken SQL. Added tests for this.

Jess




More information about the DBIx-Class mailing list