I am trying to insert the date in oracle using java.util.Date object , but when i am trying to create a date object it is showing that the constructor for Date is deprecated.
how to solve the issue and suggest a possible solution to insert the date in database.
That’s not a Hibernate or data access layer issue.
Date constructor has been deprecated by Java, and you can construct in many ways, even from a String template:
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date dateObject = sdf.parse("2018-02-03");
The mapping should be like this:
private Date birthday;
Thank You Vlad Sir for the solution…