OK so I want to have an entity in database where I would store date and another where I would store TIME (no date). I'd also like to store date of birth
so what I've did is create java classes, using @javax.persistence annotations and such, all went well, I have my entities now in mysql.
The problem is, when I said I have an attribute DATE birth_date, mysql uses DATETIME for that attribute. So now when I save let's say 1986-02-02, mysql adds 00:00:00.
Is there any javax.persistence annotation where I could say what type should mysql store?
I also have a few problems with TIME (I want to just store hours and minutes, no seconds, years, days, months). Which type should I choose for attribute "myTime"?
Thanks for your help!
|