Skip to content

Commit 16f6eca

Browse files
author
angump
committed
Corrected issue with beerId
1 parent f2c4b53 commit 16f6eca

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/main/java/guru/sfg/beer/inventory/service/domain/BeerInventory.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,19 @@
1616
*/
1717
package guru.sfg.beer.inventory.service.domain;
1818

19+
import java.sql.Timestamp;
20+
import java.util.UUID;
21+
22+
import javax.persistence.Column;
23+
import javax.persistence.Entity;
24+
25+
import org.hibernate.annotations.Type;
26+
1927
import lombok.Builder;
2028
import lombok.Getter;
2129
import lombok.NoArgsConstructor;
2230
import lombok.Setter;
2331

24-
import javax.persistence.Entity;
25-
import java.sql.Timestamp;
26-
import java.util.UUID;
27-
2832
/**
2933
* Created by jt on 2019-01-26.
3034
*/
@@ -43,7 +47,10 @@ public BeerInventory(UUID id, Long version, Timestamp createdDate, Timestamp las
4347
this.quantityOnHand = quantityOnHand;
4448
}
4549

50+
@Type(type="org.hibernate.type.UUIDCharType")
51+
@Column(length = 36, columnDefinition = "varchar(36)", updatable = false, nullable = false )
4652
private UUID beerId;
53+
4754
private String upc;
4855
private Integer quantityOnHand = 0;
4956
}

0 commit comments

Comments
 (0)