is($links[0]->url, undef);
is($links[1]->url, 'url42');
-## make sure populate -> insert_bulk honors fields/orders in void context
+## make sure populate -> _insert_bulk honors fields/orders in void context
## schema order
$schema->populate('Link', [
[ qw/id url title/ ],
my $rs = $schema->resultset('Link');
$rs->delete;
- # test insert_bulk with all literal sql (no binds)
+ # test populate with all literal sql (no binds)
$rs->populate([
(+{
my $rs = $schema->resultset('Link');
$rs->delete;
- # test insert_bulk with all literal/bind sql
+ # test populate with all literal/bind sql
$rs->populate([
(+{
url => \['?', [ {} => 'cpan.org' ] ],
$rs->delete;
- # test insert_bulk with mix literal and literal/bind
+ # test populate with mix literal and literal/bind
$rs->populate([
(+{
url => \"'cpan.org'",
} 'literal+bind with semantically identical attrs works after normalization';
# test all kinds of population with stringified objects
+# or with empty sets
warnings_like {
local $ENV{DBIC_RT79576_NOWARN};
[qw( rank name )],
[ $rank, $fn ],
]},
+
+ 'empty set' => { AoA => [
+ [qw( name rank )],
+ ]},
};
# generate the AoH equivalent based on the AoAs above
for my $bag (values %$args) {
+ $bag->{AoH} = [];
my @hdr = @{$bag->{AoA}[0]};
for my $v ( @{$bag->{AoA}}[1..$#{$bag->{AoA}}] ) {
push @{$bag->{AoH}}, my $h = {};