Closed okachobi closed 8 years ago
Closing this issue. Because I modified the table to have a combination key, but the configuration id_column_overrides set it to just id, both saves resulted in SQL that only references the id column. Once I set the id_column_overrides array to include the array('id', 'name') for table 'attribute' it worked as expected. :moron:
I have some code where I begin a transaction, then do the equivalent of:
When I look at the table, both rows type1 and type2 have the value set to "y". The Primary key is a combination of id and name. There is other code in there too to handle exceptions and rollback, and create the row if they come back as null, but in the case where both exist and I update the value, the 2nd value overwrites the first.
Am I using the library wrong? I simply want to update 2 records as a transaction and rollback if either update fails. I can do this easily with SQL, but can't seem to figure out how to do it with idiorm.