I am inserting rows into a MS SQL Server table from a Rails 2.0
application. However, when ActiveRecord issues a "SELECT @@IDENTITY
AS Ident" after each insert, it only ever returns the values of the
initial SELECT. (The log shows it''s hitting cache.)
Is this the proper way to disable caching for these inserts?
files.each do |f|
ActiveRecord::Base.connection.uncached do
self.items.create!(:file => f) unless f.blank?
end
end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---