1

私はrubyの世界にいて、activerecord(3.2.11)、tiny_tds(0.5.1-x86-mingw32)、activerecord-sqlserver-adapter(3.2.10)を使用しています。

次の作品:

require 'active_record'  
class My_Table < ActiveRecord::Base; end  
My_Table.establish_connection connection_hash  
My_Table.first  

以下は、同じセッションでConnectionNotEstablishedをスローします。

require 'active_record'  
class My_Table < ActiveRecord::Base; end  
My_Table.establish_connection connection_hash  
My_Table.order(:some_column).first  

回避策として、私はそのようなすべてのレコードをプルしてルビーでソートしていますが、これは明らかに間違っています。明らかな何かが欠けています。それは何ですか?

4

0 に答える 0