Jparepository Sql Syntax Error When Trying To Save To Mysql Date
I have the following row in my MySQL Table: https://i.stack.imgur.com/u0FC4.png This column is represented as: @Column(name='release') @DateTimeFormat(pattern = 'yyyy-MM-dd
Solution 1:
According to your feedback, remoing @DateTimeFormat resolves the issue with the database mapping - so this is the first thing.
Next I would recommend to separate the data transfer objects used for the forms from the actual entities. It will help a lot in the long run. So you have a MovieDTO for form binding, where you can put @DateTimeFormat and other form validations like @NotNull. Then you will need to map the movieDto object to the movie entity before persisting.
Post a Comment for "Jparepository Sql Syntax Error When Trying To Save To Mysql Date"