From e24362b8abc910084a955f611ef417be46e2c349 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laczk=C3=B3=20Csongor=20Lor=C3=A1nd?=
 <laczko.csongor.lorand@hallgato.ppke.hu>
Date: Tue, 14 May 2024 23:00:06 +0200
Subject: [PATCH] fix: Resolve Spring Boot and Hibernate warnings

- Set `spring.jpa.open-in-view` to `false` in `application.properties` to disable database transactions being kept open until the view is rendered.
- Removed `spring.jpa.database-platform` from `application.properties` to allow Hibernate to automatically select the correct dialect based on the JDBC connection metadata.
---
 backend/src/main/resources/application.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties
index 17e1461..eab6905 100644
--- a/backend/src/main/resources/application.properties
+++ b/backend/src/main/resources/application.properties
@@ -6,7 +6,7 @@ spring.datasource.url=jdbc:h2:mem:test
 spring.datasource.driverClassName=org.h2.Driver
 spring.datasource.username=sa
 spring.datasource.password=sa
-spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
+spring.jpa.open-in-view=false
 
 spring.h2.console.enabled=true
 spring.h2.console.path=/h2-console
-- 
GitLab