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

HHH-18532 Date/time related JavaType's are not always properly unwrapping into java.util.Date subclasses #8833

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cigaly
Copy link
Contributor

@cigaly cigaly commented Aug 28, 2024

See Jira issue HHH-18532

Fixing unwrapping date/time related values into java.sql.Date and java.sql.Time


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Aug 28, 2024

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@cigaly cigaly force-pushed the HHH-18532 branch 2 times, most recently from 02fff14 to a7f1c0d Compare August 29, 2024 20:16
@cigaly cigaly marked this pull request as ready for review September 13, 2024 12:39
Copy link
Member

@gavinking gavinking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good overall but it seems to me that those calls to construct Time should be passing in milliseconds.

@cigaly cigaly force-pushed the HHH-18532 branch 2 times, most recently from 11fecb6 to e5a3870 Compare November 4, 2024 16:28
@cigaly cigaly force-pushed the HHH-18532 branch 2 times, most recently from 1f7511d to ffaaaee Compare November 24, 2024 11:14
@cigaly cigaly requested a review from gavinking December 11, 2024 09:57
cigaly and others added 3 commits February 23, 2025 09:22
          - reordered matching in unwrap methods to push java.util.Date after java.sql.{Date,Time,Timestamp}
          - use new java.sql.{Date,Time}(instant.toEpochMilli()) instead of java.sql.{Date,Time}.from(instant);
            later method is not subclasses so it is always returning instance of java.util.Date
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

Successfully merging this pull request may close these issues.

3 participants