[#3306] Let Record.key() return a "copy record", instead of a view to the original record
This commit is contained in:
parent
f3e1dee970
commit
ac7c0a6a75
@ -281,14 +281,6 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
|
||||
assertEquals(TBook_ID(), bKey.field1());
|
||||
assertEquals(TBookToBookStore_BOOK_STORE_NAME(), b2sKey.field1());
|
||||
assertEquals(TBookToBookStore_BOOK_ID(), b2sKey.field2());
|
||||
|
||||
// [#1690] Check if modifications to the key() record are reflected in
|
||||
// the original record, and vice versa
|
||||
bKey.setValue(TBook_ID(), 5);
|
||||
assertEquals(5, (int) b.getValue(TBook_ID()));
|
||||
|
||||
b.setValue(TBook_ID(), 6);
|
||||
assertEquals(6, (int) bKey.value1());
|
||||
}
|
||||
|
||||
public void testUpdatablesInsertUpdate() throws Exception {
|
||||
|
||||
@ -82,10 +82,7 @@ import org.jooq.exception.InvalidResultException;
|
||||
public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableRecord<R> {
|
||||
|
||||
/**
|
||||
* A view holding values for the {@link Table#getPrimaryKey()}
|
||||
* <p>
|
||||
* This method returns a "view" of this record itself. Modifications to the
|
||||
* returned record will affect values in this record.
|
||||
* A Record copy holding values for the {@link Table#getPrimaryKey()}.
|
||||
* <p>
|
||||
* The returned record consists exactly of those fields as returned by the
|
||||
* table's primary key: {@link UniqueKey#getFields()}.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user