From: Simon Brandhof Date: Fri, 28 Sep 2012 16:12:12 +0000 (+0200) Subject: SONAR-2602 fix (again) the support of Oracle X-Git-Tag: 3.3~171 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bbccaf8dd9ef7549d7e960d327a7fe7c28c7cfaa;p=sonarqube.git SONAR-2602 fix (again) the support of Oracle --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb index 397f70a7926..3d61493d36f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb @@ -188,7 +188,7 @@ class Profile < ActiveRecord::Base @projects ||= begin Project.find(:all, - :conditions => ['id in (select prop.resource_id from properties prop where prop.resource_id is not null and prop.prop_key=? and prop.text_value=?)', "sonar.profile.#{language}", name]) + :conditions => ['id in (select prop.resource_id from properties prop where prop.resource_id is not null and prop.prop_key=? and prop.text_value like ?)', "sonar.profile.#{language}", name]) end end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb index 6371b51242d..151657d11b0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/property.rb @@ -21,7 +21,7 @@ class Property < ActiveRecord::Base validates_presence_of :prop_key named_scope :with_key, lambda { |value| {:conditions => {:prop_key, value}} } - named_scope :with_value, lambda { |value| {:conditions => {:text_value, value}} } + named_scope :with_value, lambda { |value| {:conditions => ['text_value like ?', value] } } named_scope :with_resource, lambda { |value| {:conditions => {:resource_id => value}} } named_scope :with_user, lambda { |value| {:conditions => {:user_id => value}} } named_scope :with_resources, :conditions => 'resource_id is not null'