From e40750eb6ff6d8f78a092257669fd5dddc106df3 Mon Sep 17 00:00:00 2001 From: mrfoxygmfr Date: Mon, 24 Mar 2025 01:31:05 +0300 Subject: fix(db/models): fix INTERVAL type handling --- .../java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java index 5211eaf..420a615 100644 --- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java +++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java @@ -1,5 +1,7 @@ package ru.mrfoxygmfr.warehouse_accounting.db.models; +import io.hypersistence.utils.hibernate.type.interval.PostgreSQLIntervalType; +import org.hibernate.annotations.Type; import jakarta.persistence.*; import lombok.*; @@ -42,7 +44,7 @@ public class Product { private long depth; @Column(nullable = true, name = "max_storage_duration", columnDefinition = "interval") - @NonNull + @Type(PostgreSQLIntervalType.class) private Duration maxStorageDuration; } -- cgit mrf-deployment