Actions
Defect #23930
closedFirebird & RedDatabase support problem
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
Redmine have some queries that uses firebird keywords, ex. count
result_scope = ActsAsTaggableOn::Tag .joins(:taggings) .select('tags.id, tags.name, tags.taggings_count, COUNT(taggings.id) as count') .group('tags.id, tags.name, tags.taggings_count') .where(taggings: { taggable_type: 'Issue', taggable_id: issues_scope})
In this example used fragment of code from plugins/redmine_tags/lib/redmine_tags/patches/issue_patch.rb (available_tags)
The problem is that count is reserved keyword and to name column it should look like this
'COUNT(taggings.id) as "COUNT"'
In my fork i located few more used keywords: position, admin.
I'll make a patch, if i'll have time, but it would be nice if someone fix it.
Actions