Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema fixes #31

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions lib/Test2/Harness/UI/Schema/Overlay/Run.pm
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,7 @@ sub expanded_coverages {
my $self = shift;
my ($query) = @_;

my $pick_me = {run_id => $self->run_id};

if ($query) {
$query = {'-and' => [$query, $pick_me]};
}
else {
$query = $pick_me;
}

my $schema = $self->result_source->schema;
$schema->resultset('Coverage')->search(
$self->coverages->search(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand how this change works, can you explain it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The has_many declaration in Schema::Run creates an accessor that's equivalent to ->related_resultset($name).

$query,
{
order_by => [qw/test_file_id source_file_id source_sub_id/],
Expand Down