1
0
mirror of https://github.com/google/nomulus synced 2026-05-28 10:40:44 +00:00

Disable auto-generation on id for HostHistory and ContactHistory (#827)

This commit is contained in:
Shicong Huang
2020-10-08 12:30:54 -04:00
committed by GitHub
parent 2e230664fd
commit 17a1387184
10 changed files with 18 additions and 42 deletions

View File

@@ -31,8 +31,6 @@ import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.PostLoad;
@@ -63,7 +61,6 @@ public class ContactHistory extends HistoryEntry implements SqlEntity {
@Id String contactRepoId;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "TempHistorySequenceGenerator")
@Column(name = "historyRevisionId")
@Access(AccessType.PROPERTY)
@Override

View File

@@ -32,8 +32,6 @@ import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.PostLoad;
@@ -65,7 +63,6 @@ public class HostHistory extends HistoryEntry implements SqlEntity {
@Id String hostRepoId;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "TempHistorySequenceGenerator")
@Column(name = "historyRevisionId")
@Access(AccessType.PROPERTY)
@Override

View File

@@ -11,11 +11,6 @@
</attributes>
</embeddable>
<sequence-generator name="HistorySequenceGenerator" sequence-name="history_id_sequence"/>
<!-- TODO(shicong): Drop this sequence and change all history tables to use the above one. -->
<sequence-generator name="TempHistorySequenceGenerator" sequence-name="temp_history_id_sequence"/>
<persistence-unit-metadata>
<persistence-unit-defaults>
<entity-listeners>