Created
May 8, 2009 08:32
-
-
Save genki/108708 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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