Displaying 1 result from an estimated 1 matches for "industries_risk".
Did you mean:
industries_risks
2006 Jan 05
3
ActiveRecord setting IDs on auto increment fields
...els of the source tables join with
"has_and_belongs_to_many". It seems like ActiveRecord is setting the
"id" field for the join table- This should be an auto_increment and
ActiveRecord shouldn''t need to force a value, no?
the table looks like this:
CREATE TABLE `industries_risks` (
`id` int(10) unsigned NOT NULL auto_increment,
`industry_id` int(10) unsigned default NULL,
`risk_id` int(10) unsigned default NULL,
`created_on` datetime default NULL,
`updated_on` datetime default NULL,
PRIMARY KEY (`id`)
) TYPE=InnoDB;
the code in question is almost direc...