Patch by Go MAEDA.
git-svn-id: https://svn.redmine.org/redmine/trunk@22271
e93f8b46-1217-0410-a6f0-
8f06a7374b81
" AND " +
queried_class.send(:sanitize_sql_for_conditions, ["#{JournalDetail.table_name}.old_value IN (?)", value.map(&:to_s)]) +
")"
- if %w[ev !ev].include?(operator)
- subquery <<
+ sql_ev =
+ if %w[ev !ev].include?(operator)
" OR " + queried_class.send(:sanitize_sql_for_conditions, ["#{db_table}.#{db_field} IN (?)", value.map(&:to_s)])
- end
- sql = "#{neg} EXISTS (#{subquery})"
+ else
+ ''
+ end
+ sql = "#{neg} (EXISTS (#{subquery})#{sql_ev})"
else
sql = '1=0'
end