What’s the best way to insert jodatime objects into database using JDBC, and how to get them from it? I used to use MutableDateTime, and covert it into Timestamp before insert. But when I want to get my data from database, i got an issue.. i dont know how to do it, and how to parse types. So once again: how to insert and select Joda-Time objects into/from database.
Share
You can use an ORM that supports custom types. For example, sormula Joda Time example. Implement a TypeTranslator like LocalDateTranslator and all uses of corresponding class, LocalDate, will use type translator to convert to/from column in db.