executeInsert()
과 대조적으로 executeUpdate()
을 사용하는 것의 차이점을 생각해 봤습니다. java.lang.RuntimeException가 : TypeDoesNotMatch (2013년 4월 15일 13 변환 할 수 없습니다 : 58 : 46.0 : 클래스 자바를 다음 코드에서Anorm Scala executeUpdate와 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")
}
나는 다음과 같은 문제를 얻을 executeInsert()
을 사용했다. sql.Timestamp Long ColumnName (density_cache.day_of, Some (day_of))에 대한
그러나 내가 executeUpdate()
로 전환하면 제대로 작동합니다.