Skip to content

Instantly share code, notes, and snippets.

@genki
Created May 8, 2009 08:32
Show Gist options
  • Save genki/108708 to your computer and use it in GitHub Desktop.
Save genki/108708 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment