I waved my difference between using executeUpdate() rather than executeInsert() .
In the following code, I used executeInsert()
def addEntry(day: DateMidnight, create_time: DateTime, points: Long, src: String) = DB.withTransaction { implicit connection => Logger.debug("I got here") SQL( """ INSERT INTO density_cache(day_of, create_time, points, src) VALUES ({day_of}, {create_time}, {points}, {src}) """ ).on( 'day_of -> day, 'create_time -> create_time, 'points -> points, 'src -> src ).executeInsert() Logger.debug("Got to 2nd step") }
I get the following problem: Java.lang.RuntimeException: TypeDoesNotMatch (cannot convert 2013-04-15 13: 58: 46.0: class java.sql.Timestamp to Long for column ColumnName (density_cache.day_of, Some (day_of)))
But when I switch to executeUpdate() , it works fine.
Ray h source share