Код: Выделить всё
import io.micronaut.data.annotation.MappedEntity
import jakarta.persistence.GeneratedValue
import jakarta.persistence.Table
@MappedEntity
@Table(name = "special", schema = "abc")
data class SpecialEntity(
val uuid: Uuid,
@GeneratedValue
val createdAt: Instant? = null
)
< /code>
import io.micronaut.data.jdbc.annotation.JdbcRepository
import io.micronaut.data.repository.kotlin.CoroutineCrudRepository
import java.util.UUID
@JdbcRepository
interface SpecialEntityRepository : CoroutineCrudRepository {
suspend fun saveAll(entities: Iterable): ArrayList
}
< /code>
The problem I am facing is that because of the GeneratedValueПодробнее здесь: https://stackoverflow.com/questions/783 ... onaut-data