Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 132276
Status: new
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: as_subselect_rs makes invalid assumptions about columns
from #dbix-class just now: 12:03 < ether> boo, if I do $rs->columns([ smaller list of cols ])->as_subselect_rs->... then I die, because teh subselect tries to get *all* columns as listed in the table's result_source, not just the columns that were available in the subselect 12:03 < ether> I need to ->as_subselect_rs->columns($original_rs->{attrs}{columns})->... 12:03 < ether> this feels like a bug 12:04 < ether> counter-opinions? 12:04 < mst> sub subsel_with_cols { shift->search({}, { columns => \@_ })->as_subselect_rs->search({}, { columns => \@_ }) } 12:04 < ether> yes, that is basically what I said 12:04 < ether> shouldn't as_subselect_rs do this automatically? 12:04 < ether> it can't assume that all the columns are available for it 12:05 < ether> it should only select the columns that are actually there 12:05 < mst> probably Note: the 'columns' method being used here comes from frew's Helpers -- it is equivalent to ->search(undef, { columns => ... }).