Skip to content
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

Cannot map resultset field to Optional<Instant> #486

Closed
pawelgosztyla opened this issue Feb 9, 2018 · 4 comments
Closed

Cannot map resultset field to Optional<Instant> #486

pawelgosztyla opened this issue Feb 9, 2018 · 4 comments
Milestone

Comments

@pawelgosztyla
Copy link

pawelgosztyla commented Feb 9, 2018

Hi,
I'm using SimpleFlatMapper as RecordMapperProvider in Jooq. Looks like it cannot map Timestamp field into Optional<Instant> property, it throws an exception:
org.simpleflatmapper.map.MapperBuildingException: Could not find getter for JooqFieldKey{field="routes"."plannedtransportstarttime", index=2} type ParameterizedTypeImpl{rawType=class java.util.Optional, types=[class java.time.Instant]} path plannedTransportStartTime See https://github.com/arnaudroger/SimpleFlatMapper/wiki/Errors_FMMB_GETTER_NOT_FOUND

The same issue when trying to map to Optional<OffsetDateTime> property.
Regards

@arnaudroger
Copy link
Owner

will have a look.

@arnaudroger
Copy link
Owner

the optional mapping get the constructor injection path in the getter, and it does not currently get the convertion path after that. will see if I can integrate that in there.
worst case scenario I'll add a Optional converter

@arnaudroger arnaudroger added this to the 3.15.6 milestone Feb 9, 2018
@arnaudroger
Copy link
Owner

arnaudroger commented Feb 9, 2018

just pushed version 3.15.6 to maven central, should be available in the next 30 minutes.
It now looks for a converter before trying to find another constructor path.
can you confirm if it solves your issue?

@pawelgosztyla
Copy link
Author

Yes, it solved my issue. Thanks @arnaudroger, this was amazingly quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants