因为 实体类中的主键 是String类型 不能自动为其分配id  所以需要手动设置在service层   model.setId(UUID.randomUUID().toString());

报错:Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): cn.itcast.bos.domain.base.SubArea的更多相关文章

  1. Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.qingmu.seller.entity.OrderMaster

    org.springframework.orm.jpa.JpaSystemException: ids for this class must be manually assigned before ...

  2. org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save()

    org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before ...

  3. 错误/异常:org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save() 的解决方法

    1.错误/异常视图 错误/异常描述:id的生成错误,在调用save()方法之前,必须先生成id. 2.解决方法     在对应的实体类的主键(id)的get方法上加上:@GeneratedValue( ...

  4. hibernate save数据的时候报错:ids for this class must be manually assigned before calling save()

    这个错误是因为eclipse  这种jpatools 自动生成的实体类内没把id 设置为自增,还有id的值在生成的时候默认为string 即使加上了也所以无法自增 ,所以还需要把string 换成In ...

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

    原文: http://blog.csdn.net/softimes/article/details/7008875 引起问题的原因: 由Hibernate根据数据库表自动生成的"类名.hbm ...

  6. 报错Caused by: org.hibernate.AnnotationException: No identifier specified for entity:

    Caused by: org.hibernate.AnnotationException: No identifier specified for entity:. 原因: 1.没有给实体类ID 解决 ...

  7. org.hibernate.id.IdentifierGenerationException

    [问题]org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned bef ...

  8. 异常:org.hibernate.id.IdentifierGenerationException

    在有关联关系的数据表中保存数据时,先保存一端,再保存多端的抛出的异常(此时不管一端,还是多端的对象都没有设置id,属性,也就是要保存的两个对象的id 属性为空.) org.hibernate.id.I ...

  9. org.hibernate.id.IdentifierGenerationException错误解决方法

    org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before ...

随机推荐

  1. 【leetcode刷题笔记】Reverse Words in a String

    Given an input string, reverse the string word by word. For example,Given s = "the sky is blue& ...

  2. 从mysqldump整库备份文件中恢复单表

    最近,系统更新出现了问题,比较紧急,需要对三张表进行回档.由于我们都是采用mysqldump进行每天全备整库,数据量比较大,一个备份文件大概有70G,需要从这个70G文件中恢复三张表,真是蛋疼至极啊, ...

  3. 20145210姚思羽《网络对抗》——shellcode注入& Return-to-libc攻击深入

    20145210姚思羽<网络对抗>shellcode注入&Return-to-libc攻击深入 shellcode基础知识 Shellcode是一段代码,作为数据发送给受攻击服务器 ...

  4. 三维bfs

    胜利大逃亡 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submi ...

  5. Struts2的使用

    Struts2的核心类库 名称 说明 Struts2-core-2.3.4.jar 核心类库 Xwork-core-2.3.4.jar Xwork的核心类库 Ognl-3.0.5.jar Ognl表达 ...

  6. MyEclipse消除frame引起的the file xxx cannot be found

    因为该页面所指向的页面路径不对,便进行手动修改,修改时却出现了很烦的问题,输入一个字就弹出一个提示框“the file XXX can not be found.Please check the lo ...

  7. Java集合类--->入门上篇

    最近我又在研究Java语言,这是第五次还是第六次学习Java的集合类,你也许会惊讶为什么这么多次?哈哈,因为之前的我没有记录下来,忘记了,当然最主要还是觉得自己毅力不够,没有坚持.那么,这次我将换一种 ...

  8. linux命令学习笔记(36):diff 命令

    diff 命令是 linux上非常重要的工具,用于比较文件的内容,特别是比较两个版本不同的文件以找到改动的地方. diff在命令行中打印每一个行的改动.最新版本的diff还支持二进制文件.diff程序 ...

  9. JQuery基本知识、选择器、事件、DOM操作、动画--2017年2月10日

    $(对象)可以将JS对象转换为JQuery对象  .get(0)可以将JQuery对象转换为JS对象 并无太大区别,灵活点出即可

  10. uboot命令(1):mmc命令

    版权声明 更新:2017-06-07博主:LuckyAlan联系:liuwenvip163@163.com声明:吃水不忘挖井人,转载请注明出处! 1 文章介绍 今天在进行Android分区修改的时候发 ...