Out of nowhere, my app is getting intermittent NonUniqueObjectExceptions on the update of an existing object.
I've looked around and the reasons that are usually given for this issue have to do with either detached objects or bad identity generation. I'm not using any detached objects and my identity generation is using an oracle sequence generator. I checked the generator, just to be sure someone didn't reset it but it's fine. I'm pretty sure this isn't the issue anyway because this is an update to an existing object.
At this point, I'm thinking that somehow the session no longer thinks the object in question is part of the session and sees my request as a create. One thing that may or may not matter is that the existing object in question is being linked (many-to-one) to an new object and that is the change in question.
Does any one have any ideas on what might cause the session to see the update as a create? Note that this doesn't always happen. When the user retries the change following the error, it works as expected.
|