1. Create a postgresql table with a varchar primary key.
2. Specify a new key value and try to save the new record.
ActiveRecord will insert the record, and then immediately bomb with an error when it tries to query a non-existent sequence table. This error causes the inserted record to get rolled back.
Looks like ActiveRecord assumes that all primary keys have a sequence table in postgresql.
Am I forgetting to do something or is this a major bug in ActiveRecord?
1. Create a postgresql table with a varchar primary key.
2. Specify a new key value and try to save the new record.
ActiveRecord will insert the record, and then immediately bomb with an error when it tries to query a non-existent sequence table. This error causes the inserted record to get rolled back.
Looks like ActiveRecord assumes that all primary keys have a sequence table in postgresql.
Am I forgetting to do something or is this a major bug in ActiveRecord?
Someone reading this message over my shoulder just asked me,
'who is "reproduce"?'
Now I have to fix the loss of my credibility for recommending ActiveRecord 1.1.0 as being production-ready. Ah well, it's a good reminder to run our *own* tests even if the product comes with self-tests (like ruby 1.8.2 snapshots).
I'm glad ActiveRecord didn't put a contraint on the schema forcing us to use *only* numeric, auto-incrementing primary keys. Many of us have existing schemas with at least one text primary key--and don't have the luxury of modifying them.
···
On Sat, 11 Dec 2004 11:27:24 +0900, J. D. <jd@nospam.com> wrote: