I've made some more progress on getting ActiveRecord working with JDBC.  I've got a script which successfully performs a create table migration followed by CRUD operations on an AR model sitting on top of that table.  See attached testConfidenceBuilder.rb for details of what's working.

If anyone wants to try playing with this, let me know and I can help get you set up.

Caveats:
- I've only been testing with MySQL, and as of now I need to hard-code the primary key strategy to that specified in the AR mysql_adapter.
- Type and typecasting support is fairly primitive
- Lots of adapter features remain unimplemented and untested including transactions, limit/offset queries, and sequences.
- Probably more things I haven't seen yet

I'm now attempting to run the ActiveRecord unit tests themselves, and it's not pretty -- almost all of them err.

But progress is progress, and hopefully a little light at the end of the tunnel is showing that it indeed will be possible to use JRuby, ActiveRecord and JDBC.

Comments appreciated!

/Nick

Attachment: testConfidenceBuilder.rb
Description: Binary data

Attachment: jdbc_adapter.rb
Description: Binary data

Reply via email to