mirror of
https://github.com/google/nomulus.git
synced 2025-07-24 19:48:32 +02:00
Add and use temp_history_id_sequence to avoid release error (#795)
This commit is contained in:
parent
d6d44d73ba
commit
baa59b1f55
7 changed files with 40 additions and 5 deletions
|
@ -53,7 +53,7 @@ public class ContactHistory extends HistoryEntry {
|
|||
VKey<ContactResource> contactRepoId;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "HistorySequenceGenerator")
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "TempHistorySequenceGenerator")
|
||||
@Column(name = "historyRevisionId")
|
||||
@Access(AccessType.PROPERTY)
|
||||
@Override
|
||||
|
|
|
@ -76,7 +76,7 @@ public class DomainHistory extends HistoryEntry {
|
|||
Set<VKey<HostResource>> nsHosts;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "HistorySequenceGenerator")
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "TempHistorySequenceGenerator")
|
||||
@Column(name = "historyRevisionId")
|
||||
@Access(AccessType.PROPERTY)
|
||||
@Override
|
||||
|
|
|
@ -54,7 +54,7 @@ public class HostHistory extends HistoryEntry {
|
|||
VKey<HostResource> hostRepoId;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "HistorySequenceGenerator")
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "TempHistorySequenceGenerator")
|
||||
@Column(name = "historyRevisionId")
|
||||
@Access(AccessType.PROPERTY)
|
||||
@Override
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
</attributes>
|
||||
</embeddable>
|
||||
|
||||
<sequence-generator name="HistorySequenceGenerator" sequence-name="history_id_sequence" />
|
||||
<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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue