-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java 8 DateTime in DbMapper #1454
Comments
OK, this seems to be Helidon DB Client issue. I'll let you know when I know more. |
I'm trying to run your sample code.
Starts PgSQL to be used by jUnit tests, but there is no DB schema and tests are failing with erorrs like
Does your sample code have some DB initialization part, or at least SQL script to run? |
Use docker-compose.yaml file to serve PostgreSQL service, it includes an init.sql script file |
Thanks, it works now. |
If you replace this line. with: post.setCreatedAt(createdAt.as(LocalDateTime.class)); Will get an exception, but according to PostgreSQL JDBC doc. it should work if DbMapper used ResultSet or RowSet in backend. |
I got it:
when running
on code with few modifications:
|
The question is, whether this is a bug or a feature. :) |
Fixed in PR #1485 |
PR is merged, closing this issue. |
I used PostgreSQL for tests, the PostgreSQL Jdbc driver supports Java 8 DateTime well.
But when I tried to fetch a
TIMESTAMP
field toLocalDateTime
property, it failed.The
DbMapper
, it always ajava.sql.TimeStamp
, I can not convert it asLocalDateTime
direclty.My sample codes.
The text was updated successfully, but these errors were encountered: