Use a LIKE test instead of equality

Fixes the ability to search for CVE (as well as other reference types)
with a non-exact match

[SeeRM #7989]
unstable
James Lee 2013-05-29 16:12:31 -05:00
parent e7a1f06fbc
commit 12f0448bb4
1 changed files with 2 additions and 2 deletions

View File

@ -666,11 +666,11 @@ class DBManager
formatted_values = value_set.collect { |value|
prefix = keyword.upcase
"#{prefix}-#{value}"
"#{prefix}-%#{value}%"
}
query = query.includes(:refs)
union_conditions << Mdm::Module::Ref.arel_table[:name].eq_any(formatted_values)
union_conditions << Mdm::Module::Ref.arel_table[:name].matches_any(formatted_values)
end
end