Fix id generation in PackagePromotion (#1788)

* Fix id generation in PackagePromotion

* Fix update command tests
This commit is contained in:
sarahcaseybot
2022-09-21 15:19:49 -04:00
committed by GitHub
parent 1d3738da27
commit a9d59e4d6e
4 changed files with 20 additions and 13 deletions
@@ -29,6 +29,8 @@ import java.util.Optional;
import javax.annotation.Nullable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import org.hibernate.annotations.Columns;
import org.hibernate.annotations.Type;
@@ -41,7 +43,9 @@ import org.joda.time.DateTime;
public class PackagePromotion extends ImmutableObject implements Buildable {
/** An autogenerated identifier for the package promotion. */
@Id long packagePromotionId;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
long packagePromotionId;
/** The allocation token string for the package. */
@Column(nullable = false)