solidusio/solidus

SQL error while searching by variant name in stock management view

tvdeyen opened this issue · 3 comments

Getting the an issue in Stock management view while searching by variant name.

ActiveRecord::StatementInvalid (PG::InvalidColumnReference: ERROR:  for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 1: ...e_option_values"."name" ILIKE '%blish%') ORDER BY "spree_var...

will open an issue as this is a regression we introduced in 4.2

Originally posted by @tvdeyen in #3626 (comment)

Hi @tvdeyen, I believe this is a duplicate of this issue #5506. I have a failing feature spec written for #5506 but I haven't settled on a solution yet, so I will put up draft PR at some point today.

Thanks, indeed @nvandoorn

@tvdeyen I opened #5660, let me know what you think.