Avoid upcoming DBIC warning on implicit SELECT * invocation (RT#118178)
Dagfinn Ilmari Mannsåker [Tue, 4 Oct 2016 16:29:03 +0000 (17:29 +0100)]
Changes
lib/DBIx/Class/Schema/Loader/DBI.pm

diff --git a/Changes b/Changes
index e2e26b4..e90cfaa 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for Perl extension DBIx::Class::Schema::Loader
 
+        - Avoid upcoming DBIC warning on implicit SELECT * invocation
+          (RT#118178)
+
 0.07046  2016-09-05
         - Introspect view definitions for PostgreSQL, MySQL, Oracle,
           Firebird, and InterBase.
index 9bc461e..f37775b 100644 (file)
@@ -273,7 +273,7 @@ sub _sth_for {
     my ($self, $table, $fields, $where) = @_;
 
     my $sth = $self->dbh->prepare($self->schema->storage->sql_maker
-        ->select(\$table->sql_name, $fields, $where));
+        ->select(\$table->sql_name, $fields || \'*', $where));
 
     return $sth;
 }