odbc_adapter icon indicating copy to clipboard operation
odbc_adapter copied to clipboard

Upgrade to rails 6

Open Shehbaz opened this issue 5 years ago • 2 comments

Shehbaz avatar Sep 01 '20 12:09 Shehbaz

I pulled from this branch but it's not working for me (I'm using Rails 6.1.3.2). Whenever I try to query something on a table, this is the error I get

undefined method `ID' for #<Snowflake::Company:0x00007fe66381e650>
Did you mean?  id?
               id=

LiChoi avatar Aug 04 '21 20:08 LiChoi

I pulled from this branch but it's not working for me (I'm using Rails 6.1.3.2). Whenever I try to query something on a table, this is the error I get

undefined method `ID' for #<Snowflake::Company:0x00007fe66381e650>
Did you mean?  id?
               id=

Might be similar to issue we saw on Rails 5 trying to use ActiveModel localytics/odbc_adapter#33.

When following the instructions from the blog we had to add this to odbc.rb to change the id lookup in the adapter:

  # Possible bug with base adapter not fixing the case for primary key 'ID' in Snowflake.
  def primary_key(table_name)
    format_case(super || "ID")
  end

hle-skillz avatar Aug 25 '21 22:08 hle-skillz