Mahesh Bhatt
03/29/2023, 8:20 PMval meterId = varchar("meter_id")
"[129691049, 129691048, 129691041, 129690909, 129690240]"
in spring boot it is handled like this
@Type(type = "json")
@Column(name = "story_set", columnDefinition = "json")
private Set<Integer> storyIdSet;
what i can't figure out is to write its ktor equivalentimplementation("org.ktorm:ktorm-jackson:${ktorm_version}")
val storyIdSet = json<List<Int>>("story_set")
then can be converted to Set<Int> like
val storyIdSet: Set<Int> = it[UserHistoryEntity.storyIdSet]?.toSet() ?: emptySet()
Andrew O'Hara
03/29/2023, 9:32 PMspring-data-jpa
module of Spring to get database access through Hibernate.
The good news is that you're free to continue using Hibernate with Ktor; it might just take some additional effort to integrate it, because you don't have the whole framework aspect of Spring to do it for you.
Ktorm is an excellent solution, but it's not actually related to Ktor at all; just an unfortunate name collision. I can also suggest Exposed, which is also by JetBrains.Mahesh Bhatt
03/29/2023, 9:35 PM