class MyModel < ActiveRecord::Base
set_table_name "some_table_name"
set_sequence_name "my_sequnce_name"
end
MyModel.new(:attr1 => 1, attr2 => 2).save!
leads to a exception. With:
jruby 1.6.1
gem 'rails', '3.0.7'
gem 'activerecord-jdbc-adapter', '1.1.1'
In this case prefetch_primary_key? returns false.
So the insert method in activerecord-jdbc-adapter-1.1.1/lib/arjdbc/
oracle/adapter.rb needs the sequence-name to determine the next id,
but arel doesn't use this
parameter. Without a sequence-name the default sequence-name
table_name_id is
used. This sequence doesn't exists.
Regards
Dieter
> application_pgp-signature_part
> < 1 KBAnzeigenHerunterladen