From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Date: Tue, 4 Oct 2016 16:29:03 +0000 (+0100)
Subject: Avoid upcoming DBIC warning on implicit SELECT * invocation (RT#118178)
X-Git-Tag: 0.07047~13
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f1bda9c141ad0ba202a91b5674b2d214bbd343f;p=dbsrgits%2FDBIx-Class-Schema-Loader.git

Avoid upcoming DBIC warning on implicit SELECT * invocation (RT#118178)
---

diff --git a/Changes b/Changes
index e2e26b4..e90cfaa 100644
--- 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.
diff --git a/lib/DBIx/Class/Schema/Loader/DBI.pm b/lib/DBIx/Class/Schema/Loader/DBI.pm
index 9bc461e..f37775b 100644
--- a/lib/DBIx/Class/Schema/Loader/DBI.pm
+++ b/lib/DBIx/Class/Schema/Loader/DBI.pm
@@ -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;
 }