remove setFlusMode(COMMIT) - belongs to SpringBoot 3.4.x upgrade and revert jvmArgs via +=

This commit is contained in:
Michael Hoennig 2025-01-08 09:49:53 +01:00
parent fdb3bd3897
commit 0bd50fba90
2 changed files with 2 additions and 4 deletions

View File

@ -112,8 +112,8 @@ tasks.withType(JavaCompile) {
// Configure tests
tasks.named('test') {
useJUnitPlatform()
jvmArgs += '-Duser.language=en'
jvmArgs += '-Duser.country=US'
jvmArgs '-Duser.language=en'
jvmArgs '-Duser.country=US'
}
// OpenAPI Source Code Generation

View File

@ -6,7 +6,6 @@ import net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType;
import net.hostsharing.hsadminng.hs.validation.PropertiesProvider;
import jakarta.persistence.EntityManager;
import jakarta.persistence.FlushModeType;
import java.util.regex.Pattern;
import static net.hostsharing.hsadminng.hs.validation.BooleanProperty.booleanProperty;
@ -54,7 +53,6 @@ class HsUnixUserHostingAssetValidator extends HostingAssetEntityValidator {
}
private static Integer computeUserId(final EntityManager em, final PropertiesProvider propertiesProvider) {
em.setFlushMode(FlushModeType.COMMIT);
final Object result = em.createNativeQuery("SELECT nextval('hs_hosting.asset_unixuser_system_id_seq')", Integer.class)
.getSingleResult();
return (Integer) result;