From 07de3a4387393d2d3725a580b073cc9cf384d925 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sat, 6 Jan 2024 14:53:20 +0100 Subject: [PATCH] fix: Let Spring Data fill the id field --- .../twomartens/timetable/bahnApi/model/db/ScheduledFetchTask.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/model/db/ScheduledFetchTask.kt b/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/model/db/ScheduledFetchTask.kt index 07bcf70..6c39bc3 100644 --- a/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/model/db/ScheduledFetchTask.kt +++ b/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/model/db/ScheduledFetchTask.kt @@ -19,7 +19,7 @@ data class ScheduledFetchTask( var scheduledExecutionDateTime: LocalDateTime ) { @Id - var id: ObjectId = ObjectId() + lateinit var id: ObjectId @CreatedDate lateinit var created: Instant