ids for this class must be manually assigned before calling save():

HTTP Status 500 - ids for this class must be manually assigned before calling save(): wys.zml.pojo.ArticleInfo

type Exception report

message ids for this class must be manually assigned before calling save(): wys.zml.pojo.ArticleInfo

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): wys.zml.pojo.ArticleInfo
 
解决方法:将下面的将Hibernate反转生成的xxx.hbm.xml文件中的<generator class="assigned" />改为  <generator class="identity" />
 <id name="id" type="java.lang.Integer">
            <column name="id" />
            <generator class="assigned" />
        </id>
发布了151 篇原创文章 · 获赞 402 · 访问量 171万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 编程工作室 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览