GLORP and “Conflicting values in rows”

Note to self: if GLORP keeps on insisting that your UPDATEs to a certain object really can’t be accepted due to “Conflicting values in rows”, please start by looking into the following thing first:

Maybe you just changed the :1 part of a 1:n relationship without removing the changed object from the :n part of the relationship.

If that is not enough of an explanation, take this example: If you have an Order object with OrderItems, always make sure you not only change the #order instance variable of an item when you move it from one order to another, but also remove it from the Order’s #orderItems before you commit your transaction. GLORP will be a little upset otherwise.

Only after you’ve made sure that this is not the problem (I mean, *absolutely* sure), you can start developing another completely unorganized and fruitless plan for guessing about the causes 😉