[#3359] store() after copy() executes an UPDATE instead of an INSERT, when Settings.updatablePrimaryKeys is set
This commit is contained in:
parent
3b2303b658
commit
088b5f1a25
@ -1168,6 +1168,15 @@ xxxxxx xxxxx xxxxxxxxxxxxx xxxxxxx xxxxxxxxxxxxxxxxx
|
||||
|
||||
xxxxxxxxxxxxxxx xxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxx xx x xxxxxxxxxx
|
||||
xxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxx
|
||||
|
||||
xxxxxxxxxxxxxxx xxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
x
|
||||
|
||||
xxxxx
|
||||
|
||||
@ -322,7 +322,10 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
|
||||
|
||||
@Override
|
||||
public final R copy() {
|
||||
return Utils.newRecord(fetched, getTable(), configuration())
|
||||
|
||||
// [#3359] The "fetched" flag must be set to false to enforce INSERT statements on
|
||||
// subsequent store() calls - when Settings.updatablePrimaryKeys is set.
|
||||
return Utils.newRecord(false, getTable(), configuration())
|
||||
.operate(new RecordOperation<R, RuntimeException>() {
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user