0

I am using the activerecord-jdbcderby-adapter gem with jruby 1.7.9 and rails 4.0.2 with a legacy Derby database.

My Derby tables have several smallint fields.

These are all being interpreted by the adapter as boolean (i.e. the int value is lost).

Is there a workaround for this (other than changing the column types)?

4

1 回答 1

-1

目前不需要(到目前为止没有人需要它),但可以通过一些复制粘贴来完成,例如 Firebird 适配器(以及其他一些适配器)会发生这种情况:

https://github.com/jruby/activerecord-jdbc-adapter/blob/master/lib/arjdbc/firebird/adapter.rb#L43

所以需要在这里的某个地方添加类似的东西:

https://github.com/jruby/activerecord-jdbc-adapter/blob/master/lib/arjdbc/derby/adapter.rb#L56

寻找公关 :)

于 2014-02-10T15:37:45.773 回答