From 2be4df0b6d2d68e4053c6b558a0b915e2fffe1d9 Mon Sep 17 00:00:00 2001 From: "gowthaman.b" Date: Fri, 5 Jan 2024 12:15:53 +0530 Subject: [PATCH] add more stuff --- src/main/kotlin/com/restapi/domain/db.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/restapi/domain/db.kt b/src/main/kotlin/com/restapi/domain/db.kt index cf89bfa..b140e97 100644 --- a/src/main/kotlin/com/restapi/domain/db.kt +++ b/src/main/kotlin/com/restapi/domain/db.kt @@ -180,7 +180,7 @@ object Session { val s = database .sqlQuery("SELECT nextval('${seqName(entity)}');") .findOne()?.getLong("nextval") ?: throw DataNotFoundException - return String.format("%s-%s", entity, "$s".padStart(10, '0')) + return "$entity-${"$s".padStart(10, '0')}" } val redis = JedisPooled(appConfig.redisUri().getOrDefault("redis://localhost:6739/0"))