[jOOQ/jOOQ#11788] Cast is needed in Java 8
This commit is contained in:
parent
1ab673fa9a
commit
32c08aafe1
@ -423,13 +423,14 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
|
||||
refresh(refreshFields.toArray(EMPTY_FIELD));
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
// Cast is needed in Java 8 it seems
|
||||
@SuppressWarnings({ "unchecked", "rawtypes", "cast" })
|
||||
@Override
|
||||
public final R copy() {
|
||||
|
||||
// [#3359] The "fetched" flag must be set to false to enforce INSERT statements on
|
||||
// subsequent store() calls - when Settings.updatablePrimaryKeys is set.
|
||||
return Tools.newRecord(false, getTable(), configuration())
|
||||
return (R) Tools.newRecord(false, getTable(), configuration())
|
||||
.operate(copy -> {
|
||||
|
||||
// Copy all fields. This marks them all as isChanged, which is important
|
||||
@ -440,7 +441,7 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
|
||||
if (!key.contains(field))
|
||||
copy.set((Field) field, get(field));
|
||||
|
||||
return copy;
|
||||
return (R) copy;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user