On Wed, Sep 24, 2008 at 7:14 AM, Mylka, Antoni
<[EMAIL PROTECTED]> wrote:
> I'm forced to work with a database that doesn't support
> getGeneratedKeys() (Teradata 6.0). This method is called in
> JdbcAdapterInternalService.java in the execute_insert method. I wanted
> to squeeze my insert statement through the execute_query, but I also
> wanted to keep the rails validations and to keep the rails value
> quoting. My question: Is there any civilized workaround?
>
> Do you have a better idea?

Have you considered monkey-patching #execute_insert to fit the
semantics of your database? The methods are only written in Java for a
little extra speed, so you can replace them with ruby code if you
want.

class ActiveRecord::ConnectionAdapters::JdbcConnection
  def execute_insert(...)
  end
end

/Nick
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to