{ 'children.id' => 2, 'children_2.id' => 3 },
{ prefetch => { children => 'children' } }
)->first;
-is($tree_like->children->first->children->first->name, 'quux', 'Tree search_related with prefetch ok');
+is(eval { $tree_like->children->first->children->first->name }, 'quux',
+ 'Tree search_related with prefetch ok');
-$tree_like = $schema->resultset('TreeLike')->search(
+$tree_like = eval { $schema->resultset('TreeLike')->search(
{ 'children.id' => 2, 'children_2.id' => 5 },
{ join => [qw/children children/] }
)->search_related('children', { 'children_3.id' => 6 }, { prefetch => 'children' }
- )->first->children->first;
-is($tree_like->name, 'fong', 'Tree with multiple has_many joins ok');
+ )->first->children->first; };
+is(eval { $tree_like->name }, 'fong', 'Tree with multiple has_many joins ok');
# test that collapsed joins don't get a _2 appended to the alias