hibernate错误this instance does not yet exist as a row in the database
session.save(blackList);
session.refresh(blackList);
执行这上面代码报错,this instance does not yet exist as a row in the database
xml
<hibernate-mapping>
<class name="com.BlackList" table="blacklist">
<id name="id" type="java.lang.Long">
<column name="ID" />
<generator class="native" />
</id>
<many-to-one name="user" column = "USERID" class = "com.User"></many-to-one>
<many-to-one name="appInfo" column = "APPID" class = "com.AppInfo"></many-to-one>
</class>
</hibernate-mapping>
不知道怎么解决
session.refresh(blackList);
执行这上面代码报错,this instance does not yet exist as a row in the database
xml
<hibernate-mapping>
<class name="com.BlackList" table="blacklist">
<id name="id" type="java.lang.Long">
<column name="ID" />
<generator class="native" />
</id>
<many-to-one name="user" column = "USERID" class = "com.User"></many-to-one>
<many-to-one name="appInfo" column = "APPID" class = "com.AppInfo"></many-to-one>
</class>
</hibernate-mapping>
不知道怎么解决
...全文
相关推荐
MyEclipse+hibernate错误:Could not get list of suggested identity strategies from database解决
总之,解决"MyEclipse+hibernate错误:Could not get list of suggested identity strategies from database"问题需要从数据库连接
hibernate常见错误解决方案
**PropertyNotFoundException: Could not find a setter for property name in class hibernate.Hello_Bean*
SSH整合项目中容易出现的错误
not exist or is not a readable directory这个错误是由于Tomcat无法找到或读取静态资源的目录。
错误:使用MyEclipse Database Exp
当出现"Could not get list of suggested identity strategies from database"的错误时,有几种可能的解决方案:1.
hibernate错误汇总
错误八:Exception in thread "main" org.hibernate.HibernateException: More than one row with the given identifier


