X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FFAQ.pod;h=102c4e90ecda9ae08593182553edd2282ad619d4;hp=bbdfcf59bc74f64b5bfe5130bc76391e4b7291ee;hb=e66002835945589b7174d524ba5add64e714abd2;hpb=4783a9a4721bc599e46de0ef2eed00a900325396 diff --git a/lib/DBIx/Class/Manual/FAQ.pod b/lib/DBIx/Class/Manual/FAQ.pod index bbdfcf5..102c4e9 100644 --- a/lib/DBIx/Class/Manual/FAQ.pod +++ b/lib/DBIx/Class/Manual/FAQ.pod @@ -381,10 +381,11 @@ the rows at once. =item .. update a column using data from another column? -To stop the column name from being quoted, you'll need to supply a -scalar reference: +To stop the column name from being quoted, you'll need to tell DBIC +that the right hand side is an SQL identity (it will be quoted +properly if you have quoting enabled): - ->update({ somecolumn => \'othercolumn' }) + ->update({ somecolumn => { -ident => 'othercolumn' } }) This method will not retrieve the new value and put it in your Row object. To fetch the new value, use the C method on @@ -401,7 +402,7 @@ the Row. To update and refresh at once, chain your calls: - $row->update({ 'somecolumn' => \'othercolumn' })->discard_changes; + $row->update({ 'somecolumn' => { -ident => 'othercolumn' } })->discard_changes; =item .. store JSON/YAML in a column and have it deflate/inflate automatically?