hibernate的insert的语句

一直用实体新增数据,今天有同事想用hql的insert插入数据,一直报语法错误。

我看了看官方文档,hibernate只支持insert into ... select 批量插入语句,

不支持简单的插入语句insert into tablename(colname) values(colvalue).

估计hibernate支持insert 单条插入语句就违反了hibernate的理念了,所以去掉了。酷

猜你喜欢

转载自tf665415.iteye.com/blog/2147102