Rafał Kuźmiński
09/15/2023, 7:50 AMBad value for type timestamp/date/time: {1}
and:
java.lang.NumberFormatException: Trailing junk on timestamp: '{"2023-09-15 09:44:49.67219"}'
Given tables:
object FirstTable: Table() {
val id = long("id")
}
object SecondTable:Table(){
val firstId = long("first_id")
val createdAt = timestamp("created_at")
}
Whenever I try to get all "createdAt" for FirstTable:
FirstTable.join(SecondTable, JoinType.LEFT, FirstTable.id, SecondTable.firstId)
.slice(FirstTable.id, SecondTable.createdAt.arrayAgg())
.selectAll()
.groupBy(FirstTable.id)
.map {
}
It crashes before I write even line in "map" function. Exposed is trying to parse "createdAt" and not its array, so SQL result like on screenshot breaks everything: