我使用hibernate和PostgreSQL作为Smartwcm Web应用程序SDK中的数据库.我在其中一个表中有一个字段,其数据类型是文本.当我尝试使用相应的POJO使用hibernate将值插入表中时,如果我尝试保存到数据库中的String包含,则抛出异常 '.
异常消息是:
Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; SQL [update public.slider_group set slid_grou_title=?, slid_grou_short_desc=?, site_id=?, status=?, update_date=?, no_slide=?, pos_type=?, widget_type=?, custom_html=?, widget_url=? where slid_grou_id=?]; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
Run Code Online (Sandbox Code Playgroud)
我对应表的java对象是:
public class WidgetContentTo
{
private int widgetContentId;
private int siteId;
private String widgetContentName;
private String widgetContentShortDesc;
private int noWebcontents;
private String status;
private Timestamp timeCreated;
private Timestamp updateDate;
private String posType;
private String widgetType;
private …Run Code Online (Sandbox Code Playgroud)