-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add support for plain Time fields #28474
Conversation
7298220
to
3f47f73
Compare
generators/liquibase/templates/src/main/resources/config/liquibase/master.xml.ejs
Outdated
Show resolved
Hide resolved
2d7da77
to
27dd745
Compare
The (new) test that are now failing are an inconsistency between the results of LocalTime.toString and how Spring formats this data type during output of DTOs within Rest Controllers. I'll investigate a bit more and see what a good approach would be for that. E.g.:
Expected => LocalTime.toString |
126c0de
to
1738615
Compare
@@ -37,7 +43,14 @@ public class JacksonConfiguration { | |||
*/ | |||
@Bean | |||
public JavaTimeModule javaTimeModule() { | |||
return new JavaTimeModule(); | |||
final JavaTimeModule javaTime = new JavaTimeModule(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is due to our ResourceIT compare the .toString() values and don't use a specific serializer for comparison of the inserted vs. returned values.
"Fixes" the issue, but maybe there is a cleaner solution to that. Anyway it actually does not make sense, what Jackson produces by default here, i.e. outputting seconds when the second value is 0, e.g. from 11:00 Jackson always produces 11:00:00.
6cf2ac3
to
9aa75bb
Compare
Seems like React is still having some trouble. I'll generate a sample application locally tomorrow and see if I can debug this as the output of the failing tests do not really help here. Angular is only red due to Sonar errors regarding complexity of methods, shoould be fine as this is nothing I can influence here. Rest is "green". |
e0e3018
to
9cb202a
Compare
Now React works (had some issue with field validation when the inserted value contained seconds), but seems like h2 & MariaDB do have issues with LocalTime fields if seconds are not defined (meaning they are set to 0 in LocalTime field.) I'll try to reproduce again locally and see if there is something I can do about it. |
Seemed to be related only to liquibase inserting fake data at these two databases. When passing :00 as seconds for the fake data, it works for React (as it then sets the input value properly when editing entity elements making the form be submittable without validation errors) and also for the insertion of fake data by liquibase. |
c59d929
to
bdd352a
Compare
Can be reviewed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small format adjusts
...ates/src/main/java/_package_/_entityPackage_/service/criteria/_entityClass_Criteria.java.ejs
Outdated
Show resolved
Hide resolved
...ates/src/main/java/_package_/_entityPackage_/service/criteria/_entityClass_Criteria.java.ejs
Outdated
Show resolved
Hide resolved
bdd352a
to
d0b5a96
Compare
Adjusted the requested formatting changes. :-) |
Fix #28406
Please make sure the below checklist is followed for Pull Requests.
When you are still working on the PR, consider converting it to Draft (below reviewers) and adding
skip-ci
label, you can still see CI build result at your branch.