jOOQAbstractTest.reset = false;
// [#979] When using Record.from(), and the PK remains unchanged, there
// must not result an INSERT on a subsequent call to .store()
A author1 = create().selectFrom(TAuthor()).where(TAuthor_ID().equal(1)).fetchOne();
AuthorWithoutAnnotations into1 = author1.into(AuthorWithoutAnnotations.class);
into1.yearOfBirth = null;
author1.from(into1);
assertEquals(1, author1.store());
A author2 = create().selectFrom(TAuthor()).where(TAuthor_ID().equal(1)).fetchOne();
assertEquals(author1, author2);
assertEquals(author1.getValue(TAuthor_ID()), author2.getValue(TAuthor_ID()));
assertEquals(author1.getValue(TAuthor_FIRST_NAME()), author2.getValue(TAuthor_FIRST_NAME()));
assertEquals(author1.getValue(TAuthor_LAST_NAME()), author2.getValue(TAuthor_LAST_NAME()));
assertEquals(author1.getValue(TAuthor_DATE_OF_BIRTH()), author2.getValue(TAuthor_DATE_OF_BIRTH()));
assertEquals(author1.getValue(TAuthor_YEAR_OF_BIRTH()), author2.getValue(TAuthor_YEAR_OF_BIRTH()));
assertNull(author2.getValue(TAuthor_YEAR_OF_BIRTH()));
// But when the PK is modified, be sure an INSERT is executed
A author3 = create().selectFrom(TAuthor()).where(TAuthor_ID().equal(1)).fetchOne();
AuthorWithoutAnnotations into2 = author3.into(AuthorWithoutAnnotations.class);
into2.ID = 3;
author3.from(into2);
assertEquals(1, author3.store());
A author4 = create().selectFrom(TAuthor()).where(TAuthor_ID().equal(3)).fetchOne();