X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FParser%2FDBIx%2FClass.pm;h=66367f8ee1a928114ff9c5882faf8e1c26549c61;hb=473441327e8b9ef1c9d70fc30fe03c3c18bf8ecd;hp=6d15bb9359c1a61ffd19d1777ad24adc1c89370c;hpb=1d521afde80ce560e448083985c5bed8376bda5d;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/SQL/Translator/Parser/DBIx/Class.pm b/lib/SQL/Translator/Parser/DBIx/Class.pm index 6d15bb9..66367f8 100644 --- a/lib/SQL/Translator/Parser/DBIx/Class.pm +++ b/lib/SQL/Translator/Parser/DBIx/Class.pm @@ -239,13 +239,13 @@ sub parse { # Its possible to have multiple DBIC source using same table next if $seen_tables{$source->name}++; - my $view = $sqlt->add_view( + my $view = $schema->add_view( name => $source->name, fields => [ $source->columns ], ($source->view_definition ? $source->view_definition : ()) ); if ($source->result_class->can('sqlt_deploy_hook')) { - $source->result_class->sqlt_deploy_hook($table); + $source->result_class->sqlt_deploy_hook($view); } }