Skip Menu |

This queue is for tickets about the Class-DBI-Plugin-DeepAbstractSearch CPAN distribution.

Report information
The Basics
Id: 27061
Status: new
Priority: 0/
Queue: Class-DBI-Plugin-DeepAbstractSearch

Owner: Nobody in particular
Requestors: ckatz [...]

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

Subject: error in resolving 'or' clause
Download (untitled) / with headers
text/plain 773b
Calling deep_search_where($where) on my CDBI class for my "projects" table, with a WHERE structure like $where = { 'type.code' => [ 'std', 'ddt', 'too'] } fails. Investigating a bit, I found that after this runs through _transform_where(), it becomes $where={'t_projects_type.code'=> [ 't_projects.std','ddt','t_projects.too',undef] } instead of the expected $where={'t_projects_type.code'=> [ 'std','ddt','too'] } It appears that within the ($ref eq 'ARRAY') clause in transform_where(), the else clause is being executed rather than the if clause which appears to be the correct choice. This can be worked around by specifying $where = { '-or' => [ 'type.code','std', 'type.code', 'ddt', 'type.code', 'too' ] }
From: ckatz [...]
Download (untitled) / with headers
text/plain 110b
Here's a better workaround: $where = { 'type.code' => [ -or => {'=', 'std'}, {'=', 'ddt'}, {'=', 'too'} ] };

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to