On 3/21/06, Ed C. <[EMAIL PROTECTED]> wrote:
> What about surrounding the AS clause with square brackets, like
> "dbo.Users AS [dbo.Users] ?

Rails truncates table alias names in one spot, making this a dead
simple change to make.  Try this in a plugin:

ActiveRecord::ConnectionAdapters::SQLServerAdapter.class_eval do
  def table_alias_for(table_name)
    "[#{super}]"
  end
end

I added a patch to #4251.  Please try it and let me know if it works out:

http://dev.rubyonrails.org/attachment/ticket/4251/table_alias_owner.diff

It converts .'s to _'s.

--
Rick Olson
http://techno-weenie.net
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to