missed sql key
Wallace Reis [Tue, 26 Aug 2008 23:28:56 +0000 (23:28 +0000)]
lib/SQL/Translator/Parser/DBIx/Class.pm

index 3e915bc..63cbf92 100644 (file)
@@ -241,7 +241,7 @@ sub parse {
         my $view = $schema->add_view(
           name => $source->name,
           fields => [ $source->columns ],
-          ($source->view_definition ? $source->view_definition : ())
+          $source->view_definition ? ( 'sql' => $source->view_definition ) : ()
         );
         if ($source->result_class->can('sqlt_deploy_hook')) {
           $source->result_class->sqlt_deploy_hook($view);