title: I can not validate my string field
body: <p>I am using rails and SQL server in a project. When I put the following validation in the model: <code>validates :Clave, uniqueness: true</code> I get this error: <code>can't cast ActiveRecord::ConnectionAdapters::SQLServer::Type::Char::Data to varchar</code></p>
  
  <p>this is my schema.rb</p>
  
  <pre><code>create_table "Productos", primary_key: "Clave", force: :cascade do |t|
      t.integer  "Id",                 limit: 4,                             null: false
      t.varchar  "Producto",           limit: 255
      t.varchar  "CodBarras",          limit: 50
      t.varchar  "IdEmpresa",          limit: 50
  
    end
  </code></pre>
  
  <p>this is my model producto.rb</p>
  
  <pre><code>class Producto &lt; ActiveRecord::Base
    self.primary_key = "Clave"
  
    validates :IdEmpresa, uniqueness: true
    validates :Clave, uniqueness: true
    validates :Producto, presence: true
  
  end
  </code></pre>