Use Query class to use the unique attr in Redmine < 2.3.0

Fix Issue #4
Merge pull request #7 from chocoby/fix_unique_attr_before_2_2_x

Use Query class to use the unique attr in Redmine < 2.3.0