> I would expect it to update, no matter what field was changed (so if it was
> the primary key or not it shouldn't matter)

The more I think of it, the more I agree. Such a change would go well
with the Principle of Least Astonishment:
http://en.wikipedia.org/wiki/Principle_of_least_astonishment

> But as changing it was break existing code which "clones" a record without
> explicitly calling copy(), I would propose to have a setting which indicates
> what behaviour should happen on a primary key update when using .store()

Or, since jOOQ 3.0 is a major release, maybe we should just change
this behaviour backwards-incompatibly. I could then add some remarks
to the jOOQ 2.x maintenance version Javadoc, indicating that this
behaviour will be rectified in 3.0. I have created #1949 for this:
https://github.com/jOOQ/jOOQ/issues/1949

I will generally re-think the INSERT / UPDATE behaviour of
Record.store() in jOOQ 3.0, keeping as much backwards-compatibility as
possible, of course. But this topic has lead to confusion many times
on this user group, so it's worth re-thinking

Cheers
Lukas

Reply via email to