Subject: | error in resolving 'or' clause |
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'
]
}