开发者

How to explicit set NULL value in a column in hibernate using setter method?

I am reading an Excel file to populate a database table using Hibernate + Apache POI XSSF. For inserting the data, I am using the SETTER methods of the hibernate properties along with session.save() instead of using the traditional INSERT ap开发者_开发问答proach.

The problem is that I want to explicitly set NULL values into nullable columns using setter methods when the corresponding Excel cell content is empty.

Please suggest how to achieve this.


Doesn't entity.setFoo(null); work?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜