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

UUID and OffsetDateTime support #71

Closed
petka5 opened this issue May 2, 2021 · 6 comments · Fixed by #72
Closed

UUID and OffsetDateTime support #71

petka5 opened this issue May 2, 2021 · 6 comments · Fixed by #72
Labels
enhancement New feature or request

Comments

@petka5
Copy link

petka5 commented May 2, 2021

Hi,
I'm trying to integrate your library into one of my projects.
Since my base JPA entity has a PK UUID, and @UpdateTimestamp @CreationTimestamp declared as OffsetDateTime
I could find a way to search for them.
Could you please give me some hints.
Best Regards.

@torshid
Copy link
Member

torshid commented May 2, 2021

Hello 👋

If I understand correctly, you couldn't apply filtering to a field of type OffsetDateTime, am I right? The PK or the annotations are not related to the problem I think.

@petka5
Copy link
Author

petka5 commented May 2, 2021

Yes, I have UUID and OffsetDateTime in my entity, and I could manage to apply filter on these two fields.

@torshid
Copy link
Member

torshid commented May 2, 2021

These types are currently not supported but that's quite easy to implement. I will try to do it today.

@torshid
Copy link
Member

torshid commented May 3, 2021

I just released https://github.com/turkraft/spring-filter/releases/tag/1.0.1. UUID and java.time.* types are now supported with JPA.

You may configure date patterns with the static formatters inside SpringFilterParameters if you wish so.

Current ones are:

  • Date: dd-MM-yyyy
  • LocalDate: dd-MM-yyyy
  • LocalDateTime: dd-MM-yyyy'T'HH:mm:ss
  • OffsetDateTime: dd-MM-yyyy'T'HH:mm:ss.SSSXXX
  • Instant: dd-MM-yyyy'T'HH:mm:ss.SSSXXX

Feel free to ask for other field types. :)

@torshid torshid added the enhancement New feature or request label May 4, 2021
@petka5
Copy link
Author

petka5 commented May 4, 2021

Great, it works.
I have few more use-cases in my mind, I could share them with you if you would like.

@torshid
Copy link
Member

torshid commented May 4, 2021

I would appreciate if you can share those. If they are enough generic/common I will try to implement them.

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

Successfully merging a pull request may close this issue.

2 participants