clear renderer objects before dicking around with them as well as after
Matt S Trout [Wed, 9 Oct 2013 15:15:44 +0000 (15:15 +0000)]
lib/DBIx/Class/Storage/DBIHacks.pm

index f72c866..0edba97 100644 (file)
@@ -473,6 +473,10 @@ sub _resolve_aliastypes_from_select_args {
     $sql_maker->{name_sep} = '';
   }
 
+  # local is not enough - need to ensure the inner objects get rebuilt
+  $sql_maker->clear_renderer;
+  $sql_maker->clear_converter;
+
   my ($lquote, $rquote, $sep) = map { quotemeta $_ } ($sql_maker->_quote_chars, $sql_maker->name_sep);
 
   # generate sql chunks
@@ -508,7 +512,6 @@ sub _resolve_aliastypes_from_select_args {
   };
 
   # local is not enough - need to ensure the inner objects get rebuilt
-  # with the original quoting setup (or lack thereof)
   $sql_maker->clear_renderer;
   $sql_maker->clear_converter;