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

Simply loading AutoRemoveColumns seems to interfere with DBICs group_by inferrence #83

Closed
ribasushi opened this issue Oct 10, 2017 · 7 comments

Comments

@ribasushi
Copy link
Contributor

~dbic_repo$ perl -Ilib -It/lib -MDBICTest -MDevel::Dwarn -e '
  Dwarn [ DBICTest->init_schema
                   ->resultset("Artist")
                    ->search({}, { group_by => "name" })
                     ->count_rs
                      ->as_query ]
'

vs

~dbic_repo$ perl -Ilib -It/lib -MDBICTest -MDevel::Dwarn -e '
  require DBICTest::BaseResultSet;
  DBICTest::BaseResultSet->load_components("Helper::ResultSet::AutoRemoveColumns");
  Dwarn [ DBICTest->init_schema
                   ->resultset("Artist")
                    ->search({}, { group_by => "name" })
                     ->count_rs
                      ->as_query ]
'

P.S. This is the problem with http://lists.scsys.co.uk/pipermail/dbix-class/2017-October/012682.html, user has already been informed about this issue.

@khmarochos
Copy link
Contributor

Thanks a lot!

@ribasushi
Copy link
Contributor Author

Had a moment to look: @frioux the problem is here. You must check for presence of a select as a reset in addition to columns

@ribasushi
Copy link
Contributor Author

@Melnik13 this is an easy fix, I am pretty sure @frioux would appreciate a PR with a test similar to what I showed above.

@khmarochos
Copy link
Contributor

Aye, the test is ready, the PR has been submitted!

frioux pushed a commit that referenced this issue Nov 11, 2017
@frioux
Copy link
Owner

frioux commented Nov 11, 2017

Fixed, will release after testing on travis.

@frioux frioux closed this as completed Nov 11, 2017
@frioux
Copy link
Owner

frioux commented Dec 2, 2017 via email

@frioux
Copy link
Owner

frioux commented Dec 2, 2017

Finally got tests passing on travis. I am going to give myself 30m when my kid is taking a nap to try to roll in some other fixes and features, and the cut bait and release this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants