0
我正在运行一个grails项目。也许这个问题是针对初学者的,但仍然很重要。休眠操作异常
我有一个域对象Order。在订单类模型中,我使用Joda-Time将dateCreated声明为DateTime类型。
我使用: '乔达时间:乔达时间:2.9.2'
然而,当order.save()被调用我得到以下错误的时刻:
Exception in thread "main" org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not execute statement; SQL [n/a]; Data truncation: Data too long for column 'date_created' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'date_created' at row 1
你能给我一个提示什么事吗?
'date_created'在MySQL数据库中应用的列类型是什么? – yugo
它是DATE类型 – Ectoras