I'm working through the Rails intro on\n[URL]http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html[/URL], and having a\nbit of a problem with the part on page three, where you add a recipe\nto the database. My recipes table (in Postgresql) looks like this:\n\n<pre>\nTable "public.recipes"\nColumn | Type | Modifiers=20\n-\-\-\-\-\-\-\-\-\-\-\-\-\-+-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+-\-\-\-\-\-\-\-\-\-\-\nid | integer | not null\ntitle | character varying(255) | not null\ndescription | character varying(255) |=20\ndate | date |=20\ninstructions | text |=20\nIndexes:\n"recipes_pkey" PRIMARY KEY, btree (id)\n</pre>\n\nWhen I go to add an entry using the Rails structure, I get the following er=\nror:\n[QUOTE]\nActiveRecord::StatementInvalid in Recipe#create\n\nERROR: null value in column "id" violates not-null constraint\n: INSERT INTO recipes ("title", "date", "description", "instructions") VA= LUES('Cookies',=20\n'2005-08-22', 'Good Stuff', 'I like cookeis a lot.\nMix the ingredient, and cook them.\n\nyay!\n')\n\nscript/server:49[/QUOTE]\n\nSo, it's looking like Rails isn't properly handling the primary key\nconstraint on the table. Is rails supposed to do this, or should I\nditch the primary key in the database? I don't know much about\ndatabases or about rails, so I'm probably missing something really\nobvious. Any ideas?