genki (owner)

Revisions

gist: 108708 Download_button fork
public
Public Clone URL: git://gist.github.com/108708.git
Embed All Files: show embed
do_adapter_ext.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module DataMapper
  module Adapters
    class DataObjectsAdapter < AbstractAdapter
      module SQL
      private
        alias :property_to_column_name_org :property_to_column_name
        def property_to_column_name(repository, property, *args)
          result = property_to_column_name_org(repository, property, *args)
          if property.respond_to?(:name) && property.name == :"count(*)"
            result.gsub!(/^"|"$/, '')
          end
          result
        end
      end
    end
  end
end