spring-projects / spring-projects/spring-data-rest
Partial update via PATCH ignores custom date format expressed through @JsonFormat [DATAREST-1214]
Open
@odrotbohm is already working on this.
Since Dec 31, 2020.
in: repository
type: bug
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
Jan Zyka opened DATAREST-1214 and commented
Having entity with java.sql.Timestamp field annotated with @JsonFormat.
When creating new one using POST the custom format is recognised and used.
When doing partial update using PATCH, Content-type: application/json-patch+json the update fails with:
...
"message":"Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]"}
When parsing the value update falls back to Timestamp.valueOf(...) and ignores the @JsonFormat
Affects: 2.6.10 (Ingalls SR10), 3.0.5 (Kay SR5)
Reference URL: https://github.com/janzyka/spring-json-patch
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.