The MySQL/Ruby library doesn't properly handle inserts into tables with the primary key being a BIGINT If the ID returned to the MySQL/Ruby library is LARGER than the INT range, the value is returned to Ruby truncated and incorrect. This is then passed up to ActiveRecord and into the id field of your model. The actual INSERT worked properly and when do you an ActiveRecord find for the object, it will have the proper id (assuming you find it via another method other than the truncated id returned). http://rubyforge.org/tracker/index.php?func=detail... Where it gets really messy is if you have associations on the model you are creating, the ID that is returned to AR is incorrect and it inserts it into the associated models that get auto-saved.
on 2009-03-07 23:28