squash, fixes subquery with insert_bulk
[dbsrgits/DBIx-Class.git] / t / 100populate.t
index 177231a..0310de5 100644 (file)
@@ -23,7 +23,7 @@ my $schema = DBICTest->init_schema();
 #   [ 10000, "ntn" ],
 
 my $start_id = 'populateXaaaaaa';
-my $rows = 10_000;
+my $rows = 10;
 my $offset = 3;
 
 $schema->populate('Artist', [ [ qw/artistid name/ ], map { [ ($_ + $offset) => $start_id++ ] } shuffle ( 1 .. $rows ) ] );
@@ -446,3 +446,17 @@ lives_ok ( sub {
 }, 'empty has_many relationship accepted by populate');
 
 done_testing;
+
+use DDP; use Data::Dumper;
+my $q = $schema->resultset('Artist')
+               ->search({
+                },
+                {
+                  columns => [qw/name rank/]
+                })->as_query;
+              use DDP; p $q;
+#p $q;
+#diag Dumper($q);
+#p $schema->resultset('Artist')->result_source;
+#p Dumper $q;
+$schema->storage->insert_bulk($schema->resultset('Artist')->result_source, [qw/name rank/], $q);