From f68115023ecc02d21d982661ba806acec095842d Mon Sep 17 00:00:00 2001 From: Raimonds Simanovskis Date: Sat, 19 Jun 2010 16:11:21 +0300 Subject: fixed having clause for Oracle compiler --- lib/arel/engines/sql/compilers/oracle_compiler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/arel/engines/sql/compilers/oracle_compiler.rb b/lib/arel/engines/sql/compilers/oracle_compiler.rb index 560022445a..66a91cecb5 100644 --- a/lib/arel/engines/sql/compilers/oracle_compiler.rb +++ b/lib/arel/engines/sql/compilers/oracle_compiler.rb @@ -33,9 +33,9 @@ module Arel "SELECT #{select_attributes_string}", "FROM #{from_clauses}", (joins(self) unless joins(self).blank? ), - ("WHERE #{where_clauses_array.join(" AND ")}" unless where_clauses_array.blank? ), + ("WHERE #{where_clauses_array.join(' AND ')}" unless where_clauses_array.blank? ), ("GROUP BY #{group_clauses.join(', ')}" unless groupings.blank? ), - ("HAVING #{having_clauses.join(', ')}" unless havings.blank? ), + ("HAVING #{having_clauses.join(' AND ')}" unless havings.blank? ), ("ORDER BY #{order_clauses_array.join(', ')}" unless order_clauses_array.blank? ) # Use existing method from oracle_enhanced adapter to implement limit and offset using subqueries -- cgit v1.2.3