mirror of
https://github.com/google/nomulus.git
synced 2025-07-08 20:23:24 +02:00
Disable auto-generation on id for HostHistory and ContactHistory (#827)
This commit is contained in:
parent
2e230664fd
commit
17a1387184
10 changed files with 18 additions and 42 deletions
|
@ -48,7 +48,6 @@ public class ContactHistoryTest extends EntityTestCase {
|
|||
VKey<ContactResource> contactVKey = contact.createVKey();
|
||||
ContactResource contactFromDb = jpaTm().transact(() -> jpaTm().load(contactVKey));
|
||||
ContactHistory contactHistory = createContactHistory(contactFromDb, contact.getRepoId());
|
||||
contactHistory.id = null;
|
||||
jpaTm().transact(() -> jpaTm().insert(contactHistory));
|
||||
jpaTm()
|
||||
.transact(
|
||||
|
@ -73,7 +72,6 @@ public class ContactHistoryTest extends EntityTestCase {
|
|||
.asBuilder()
|
||||
.setContactBase(null)
|
||||
.build();
|
||||
contactHistory.id = null;
|
||||
jpaTm().transact(() -> jpaTm().insert(contactHistory));
|
||||
|
||||
jpaTm()
|
||||
|
|
|
@ -49,7 +49,6 @@ public class HostHistoryTest extends EntityTestCase {
|
|||
VKey.create(HostResource.class, "host1", Key.create(HostResource.class, "host1"));
|
||||
HostResource hostFromDb = jpaTm().transact(() -> jpaTm().load(hostVKey));
|
||||
HostHistory hostHistory = createHostHistory(hostFromDb, host.getRepoId());
|
||||
hostHistory.id = null;
|
||||
jpaTm().transact(() -> jpaTm().insert(hostHistory));
|
||||
jpaTm()
|
||||
.transact(
|
||||
|
@ -70,7 +69,6 @@ public class HostHistoryTest extends EntityTestCase {
|
|||
HostResource hostFromDb = jpaTm().transact(() -> jpaTm().load(host.createVKey()));
|
||||
HostHistory hostHistory =
|
||||
createHostHistory(hostFromDb, host.getRepoId()).asBuilder().setHostBase(null).build();
|
||||
hostHistory.id = null;
|
||||
jpaTm().transact(() -> jpaTm().insert(hostHistory));
|
||||
|
||||
jpaTm()
|
||||
|
|
|
@ -80,7 +80,6 @@ public class LegacyHistoryObjectTest extends EntityTestCase {
|
|||
ContactHistory legacyContactHistory = (ContactHistory) fromObjectify;
|
||||
|
||||
// Next, save that from-Datastore object in SQL and verify we can load it back in
|
||||
legacyContactHistory.id = null;
|
||||
jpaTm()
|
||||
.transact(
|
||||
() -> {
|
||||
|
@ -160,7 +159,6 @@ public class LegacyHistoryObjectTest extends EntityTestCase {
|
|||
HostHistory legacyHostHistory = (HostHistory) fromObjectify;
|
||||
|
||||
// Next, save that from-Datastore object in SQL and verify we can load it back in
|
||||
legacyHostHistory.id = null;
|
||||
jpaTm()
|
||||
.transact(
|
||||
() -> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue