Permalink
Browse files

Support Model.get(), which explicitly sets :order to nil.

  • Loading branch information...
1 parent 893ce45 commit c29cd819835273661565014b6ae914e2e0714b76 @jpr5 jpr5 committed Jul 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/dm-salesforce-adapter/adapter.rb
@@ -136,7 +136,7 @@ def execute_select(query)
sql = "SELECT #{fields} from #{query.model.storage_name(repository.name)}"
sql << " WHERE (#{conditions})" unless conditions.empty?
- sql << " ORDER BY #{order(query.order[0])}" unless query.order.empty?
+ sql << " ORDER BY #{order(query.order[0])}" unless query.order.nil? or query.order.empty?
sql << " LIMIT #{query.limit}" if query.limit
DataMapper.logger.debug sql if DataMapper.logger

0 comments on commit c29cd81

Please sign in to comment.