-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: EXPOSED-19 Max timestamp in SQLite not working
In the `create` function in `ResultRow.kt`, `columnType` is null because `(field as? Column<*>)` is null. This causes the object read from the DB to be of type String instead of Timestamp, which results in failing to parse the date because it is not in the proper format for `Instant.parse`. `field` is of type `org.jetbrains.exposed.sql.Max` when we run the test. This is the relationship between the classes (-> means "is a subclass of"): Max -> Function -> ExpressionWithColumnType -> Expression Column -> ExpressionWithColumnType -> Expression We attempt to cast `Max` to `Column` and that fails because there is no relationship between them. So I created a marker interface `WithColumnType` for anything with a column type and cast to that instead.
- Loading branch information
Showing
4 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters