jruby/activerecord-jdbc-adapter — Issue #173: Resource ID always set to '1' on calls to ActiveRecord::Base#create
Author: lance
Created: 2012-02-17 15:04:56+00:00
State: open

Calling ActiveRecord::Base#create using a postgresql database and activerecord-jdbc-adapter-1.2.2 does not set the resource ID to the next value in the primary key sequence. Rather it's always set to 1. The value is correct in the database, and if the resource is reloaded, the id is correctly set.

Here is a simple script that illustrates the problem. Change the Gemfile to use activerecord-jdbc-adapter-1.1.3 and the problem goes away.

https://github.com/lance/pk_sequence_test