qr/\Qsearch( %condition ) is deprecated/
], 'Warning properly bubbled from search()';
-$cd->set_producers([$schema->resultset('Producer')->all]);
+# the undef-attr-arg at the end is deliberate: this is what FormFu does
+$cd->set_producers([$schema->resultset('Producer')->all], undef);
is( $cd->producers->count(), $prod_before_count+2,
'many_to_many set_$rel(\@objs) count ok' );
$cd->set_producers([$schema->resultset('Producer')->find(1)]);
{
my $artist_to_mangle = $schema->resultset('Artist')->find(2);
- $artist_to_mangle->set_from_related( artist_undirected_maps => { id1 => 42 } );
+ throws_ok {
+ $artist_to_mangle->set_from_related( artist_undirected_maps => { id1 => 42 } )
+ } qr/\QUnable to complete value inferrence - relationship 'artist_undirected_maps' on source 'Artist' results in expression(s) instead of definitive values: ( artistid = ? OR artistid IS NULL )/,
+ 'Expected exception on unresovable set_from_related'
+ ;
ok( ! $artist_to_mangle->is_changed, 'Unresolvable set_from_related did not alter object' );