Rails 4.2: What has changed for Oracle enhanced adapter

I've been posting about Rails 4.2 support status just showing # of failures and errors.
Here are major changes affected for Oracle enhanced adapter.

Native foreign key support

Oracle enhanced adapter has been supporting it. Then Rails finally supports it in Rails 4.2

So far Oracle enhanced adapter supports Oracle enhanced adapter syntax only, no support Rails native syntax yet. i.e. Oracle enhanced foreien key can take multiple columns, Rails take only one column.

Although it would be identical if it can support both ActiveRecord and Oracle enhanced adapter syntax. But in case of incompatibility ActiveRecord implementation will win, then Oracle enhanced adapter implementation will be deprecated. I believe it is the way to go.

sql_type and cast_type

This is one of the refactoring implemented for Rails 4.2. No behaviour changes for application developers, but quite a lot of internal behavior changes for database adapter developers.

Rails 4.1 or earlier one sql_type (called field_type) maps to Rails datatype, then a sql_type can have N Rails datatype. Now one sql_type can have only one Rails datatype called cast_type. Oracle enhanced adapter has bunch of set_xxxx_types method based on column name, which is not available from initialize_type_map method. So far modified then working but it looks ugly. (https://github.com/rsim/oracle-enhanced/blob/rails42/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb#L1050-L1055)

If you are interested in details. please refer Initial support for Rails 4.2 and Delegate `Column#type` to the injected type object

There are some major changes that serialized_attributes deprecated, I'll post another entry soon.