I’m having a problem with ActiveRecord (outside of Rails) where it
doesn’t allow me to set the value of the :id column. Since you’re
probably not normally supposed to fiddle with the primary key, I’m
guessing that this isn’t a bug, but is intentional. Is there any way
to override it?
The reason I need this is that I’m making a library that loads data
from a relational-like XML format into various other
databases/formats. Since the primary keys were already established in
the application that made the XML file, I need to be able to link the
records using those ids, and not the auto-increment values that MySQL
(or any other DB) assigns.
I’d rather not use raw SQL to do this so that I can get this to work
with all of the DBs that AR supports out of the box. Any ideas?