tasks to finish 4.2 support #599

kares opened this Issue Nov 7, 2014 · 17 comments


None yet

9 participants

kares commented Nov 7, 2014 edited
  • getting cast_type around in Column instances
    • for MySQL/Postgres/SQLite based on AR code
    • get type_cast working with Derby: #662
    • getting it to work with others (H2/HSQLDB etc.)
    • types should work with generic adapter: jdbc
  • _string_to_time emulation on our 1.3.x line (for custom selects e.g. SELECT now())
  • truncate support (4 all) rails/rails@9a4e183
  • review which of the supported adapters can support bigint (besides postgres rails/rails@574234b) 3c01353
  • generalize (share) columns 4.2 detection prathamesh-sonpatki@cc6b487
  • Column.new has new cast_type param rails/rails@4bd5dff
    • likely will need to be passed around for other custom Columns in a backward-compatible way
  • Column type_cast needs to be reviewed 4 all adapters rails/rails@e781aa3
  • need to check and avoid double loading (e.g. postgresql/array_parser.rb)
  • removed primary method rails/rails@05dd3df (see #609)
    • oracle depends on column.primary in prefetch_primary_key?
    • firebird depends on column.primary in prefetch_primary_key?
    • db2 depends on column.primary (but only in quote - should be fajn)
    • mssql depends on column.primary in determine_order_clause
  • [postgres] backport bit quoting rails/rails@d5411fb
  • [postgres] test XML quoting rails/rails@f6968bd
  • [postgres] bigserial PK support rails/rails@6dc1787
  • handle serialized attributes (esp. for all adapters using callbacks for lobs - Oracle, DB2, ...)
  • native (base) foreign_keys impl using JDBC API

... fix remaining/reported 4.2 bugs (besides getting the test suite green 4 all)

you can support AR 4.2 support at BountySource

--- The **[$1,700 bounty](https://www.bountysource.com/issues/5831191-tasks-to-finish-4-2-support?utm_campaign=plugin&utm_content=tracker%2F136963&utm_medium=issues&utm_source=github)** on this issue has been claimed at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F136963&utm_medium=issues&utm_source=github).

@kares What do you think for we should do for _string_to_time? Should we add our own method per in base adapter? I tried fixing it from java codebase but was not able to. Because I could not reach the column instance from native codebase.

kares commented Nov 7, 2014

I'm sorry, I can not tell without looking in detail ... I recall it's a "hack" to support conversion to Time and similar on the Java side. got introduced with the compatibility for custom selects such as SELECT now to have correct type, so there might be no Column info available (or maybe there is I'm not sure how Rails handles these cases - making sure a correct type is casted). the simplest thing possible to support would be najs :) would love to help but I really need to spend some quality AR-JDBC time elsewhere + it's about time for the youngsters to step up to their keyboards :) !

@donv donv referenced this issue in SchemaPlus/schema_plus Jan 13, 2015

Rails 4.2 support #188

@hklement hklement referenced this issue in openHPI/codeocean Mar 9, 2015

Upgrade to Rails 4.2 #4


I'd just like to mention that I've added a $100 bounty to this project on BountySouce.


Any further news on progress toward Rails 4.2 compatability?


Please note that the uuid native postgres type is not supported in the 4.2 version of the adapter. It works fine with 4.0 though. Many thanks for working on this!

langesi commented Apr 18, 2015

I've added a bounty of 250USD to the project

Ch4s3 commented Apr 19, 2015

Added another $15 and sent the bounty around on my social medias.

saveav commented Jun 20, 2015

JRuby-based Rails 4.2 unable to let gem to generate model for us. For example, Remexify gem (and also Devise) were unable of generating model from scratch through its generate command.

Ch4s3 commented Jul 23, 2015

@kares What's left on this? It looks like #632 was closed finishing [postgres] bigserial PK support rails/rails@6dc1787, and maybe type_cast for postgres.

kares commented Jul 23, 2015

we're working on it ... it still might need a week or two to get pass (hopefully most) supported adapters.

Ch4s3 commented Jul 23, 2015

Oh awesome. Need help testing anything?

kares commented Jul 23, 2015

@Ch4s3 you could run against our 1-3-stable branch as it's already (and still expected) to be updated.
we'll mostly need non-mysql/pg/sqlite testers later ... oracle, db2, hsqldb, h2 maybe ms-sql and firebird
... but its likely we won't cover all (thoroughly) since its just too much to handle on our own ...

Ch4s3 commented Jul 23, 2015

Ok, so 1-3-stable seems to work fine with jRuby 9000, Rails 4.2.3 for may app. I ran rake db:reset and a bunch of Postgres heavy rspec tests.

donv commented Jul 25, 2015

@kares Should we close this now? AR 4.2 is now supported on all but the special adapters: oracle, db2, firebird, and mssql. We could track these in separat issues, and only emit the AR 4.2 warning for these adapters.

kares commented Jul 25, 2015

do not see a reason why we should split it for a "few left" at least until a review is done. would prefer to keep the warning until the generic jdbc case handles type resolution to at least some degree (like it used to on pre 4.2) - travis-ci fully green ... think we're close but there's no need to rush. the hard work (after some of the special one reviews) will be mostly about supporting bug reports anyways.

Ch4s3 commented Aug 24, 2015


@kares kares locked and limited conversation to collaborators Aug 27, 2015
@kares kares self-assigned this Aug 31, 2015
kares commented Sep 14, 2015

after 1.3.17 that included a lot of AR 4.2 compatibility improvements, mostly for MySQL/PostgreSQL as well as the generic JDBC adapter, in 1.3.18 literally all adapters have been reviewed to support AR 4.2 to around the same extent as they handle previous AR versions ... some of course need real-world usage to confirm thus warnings are left on Oracle/DB2/MSSQL despite support being there. also worth mentioning that generic adapter: jdbc and AR-JDBC extension gems should have an easier job of handling changes such as the 'new' AR::Type system since 1.3.18

@kares kares closed this Sep 14, 2015
@kares kares added the bounty label Aug 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.