Subject.create(:id => 5, :updated_on => '2006-10-08 5:28:33')
If you look in the db it has:
updated_on: 2006-12-06 (whatever CURDATE() TIME() is)
If I look in the log it has the actual query used as:
INSERT INTO `tablName` (updated_on) VALUES (2006-12-06);
So we can see that it's completely ignored the explicit setting of id
as well as the value given for updated_on.
I did a lot of googling and found this:
ActiveRecord::Base.record_timestamps = false
Which turns off the ignoring of the updated_on value but this option
was pretty heavily burried in the api docs under Timestamp.
Is there a way to get create to just insert what I tell it to or should
I drop back to db = Mysql.new(*args) db.query(myquery) type stuff when
I need to do this?