Issue Details (XML | Word | Printable)

Key: ACTIVERECORD_JDBC-29
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: bbrowning
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
activerecord-jdbc

Insert Tries to Get Next Sequence Value For Tables Without a Primary Key

Created: 12/Aug/09 01:08 AM   Updated: 01/Oct/09 08:43 PM   Resolved: 01/Oct/09 08:43 PM
Component/s: Oracle
Affects Version/s: 0.9.1
Fix Version/s: 0.9.2

Time Tracking:
Not Specified

Tags:


 Description  « Hide

Tables without a primary key (has_and_belongs_to_many association tables for example) do not have auto-generated sequences. On inserts into these tables the adapter tries to retrieve the next sequence value which causes an exception to be thrown because the sequence doesn't exist.



bbrowning added a comment - 12/Aug/09 01:12 AM

Patch here:
http://github.com/bbrowning/activerecord-jdbc-adapter/commit/88b2a0fcfe441ef3f64849d9c485aad6d78c9438

I haven't been able to get the oracle test suite running yet but once I do I'll add another patch with a test for this issue.


Nick Sieger added a comment - 01/Oct/09 08:43 PM

Thanks, applied in 90e793f.