I just updated all of my company's Fuel libraries to the latest versions using composer. I'm currently using fuel/orm version 1.8.1.2. Long story short, something was changed in the way ORM handles primary keys which impacts any primary key that seems to be anything other than a non auto-incrementing integer.
We have several tables where the primary key of the table is not an integer, and we generate the primary key manually before insertion. We have some legacy tables that use an email address, some tables have a username (string), and some newer tables are using UUIDs. Since the latest Orm update, you can no longer set the primary key manually, and this has broken much of our legacy code. Any primary key that is manually set is now reset by the Orm package.
I have pin-pointed the issue down to line 943 of file packages/orm/classes/model.php. If I comment this line out, my primary keys remain set and my legacy code continues to work normally.
While I get the point of using an auto-incrementing integer for consistency, memory and speed, this prevents the usage of other ID types (mentioned above), especially UUIDs. Is there any specific reason this was put into the latest Orm update, and is there a way to override the type of ID that Fuel expects?