Model#import fails to find model's primary key sequence
Fixes a bug where Model#import does not work when a model's primary key has no associated 'sequence' in the database. If a value for the primary key is specified, then the insert should not require a database 'sequence' to generate a value for that primary key field.
This commit is contained in:
parent
f74bd2fbbd
commit
e12f9c4951
4 changed files with 15 additions and 2 deletions
|
@ -17,4 +17,9 @@ describe "#import" do
|
|||
assert_equal 1, result.num_inserts
|
||||
end
|
||||
end
|
||||
|
||||
it "should import models whose primary key has no sequence if the primary key's value is specified" do
|
||||
result = Widget.import Build(3, :widgets)
|
||||
assert_equal 1, result.num_inserts
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue