From: Peter Rabbitson Date: Fri, 15 Jan 2010 02:12:13 +0000 (+0000) Subject: Update troubleshooting doc X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d5a66b88fb9a4670fa09380621f4483f011d591;p=dbsrgits%2FDBIx-Class-Historic.git Update troubleshooting doc --- diff --git a/lib/DBIx/Class/Manual/Troubleshooting.pod b/lib/DBIx/Class/Manual/Troubleshooting.pod index 56bcc01..5d46805 100644 --- a/lib/DBIx/Class/Manual/Troubleshooting.pod +++ b/lib/DBIx/Class/Manual/Troubleshooting.pod @@ -100,28 +100,20 @@ The solution is to enable quoting - see L for details. -Note that quoting may lead to problems with C clauses, see -L<... column "foo DESC" does not exist ...> for info on avoiding those. - =head2 column "foo DESC" does not exist ... -This can happen if you've turned on quoting and then done something like -this: +This can happen if you are still using the obsolete order hack, and also +happen to turn on sql-quoting. $rs->search( {}, { order_by => [ 'name DESC' ] } ); -This results in SQL like this: - - ... ORDER BY "name DESC" - -The solution is to pass your order_by items as scalar references to avoid -quoting: - - $rs->search( {}, { order_by => [ \'name DESC' ] } ); +Since L >= 0.08100 and L >= 1.50 the above +should be written as: -Now you'll get SQL like this: + $rs->search( {}, { order_by => { -desc => 'name' } } ); - ... ORDER BY name DESC +For more ways to express order clauses refer to +L =head2 Perl Performance Issues on Red Hat Systems