`
阅读更多

org.hibernate.AnnotationException: No identifier specified for entity

 

报这个异常的原因是因为JavaBeam的主键没有注解映射关系

 

解决方案如下:

 

 

@Id  
@GeneratedValue(strategy=GenerationType.IDENTITY)   
@Column(name="ID", unique=true, nullable=false, insertable=true, updatable=false, precision=20, scale=0) 

 

或者

 

@Id
@GeneratedValue(generator = "paymentableGenerator")     
@GenericGenerator(name = "paymentableGenerator", strategy = "sequence",     
	                  parameters = { @Parameter(name = "sequence", value = "TEST_SEQ") })   

 

分享到:
评论

相关推荐

    hibernate.properties

    # Hibernate, Relational Persistence for Idiomatic Java # # License: GNU Lesser General Public License (LGPL), version 2.1 or later. # See the lgpl.txt file in the root directory or <http://...

    解决error C2065: '_beginthreadex' :undeclared identifier

    报错误error C2065: '_beginthreadex' :undeclared identifier

    Keil C编译器常见警告与错误信息的解决方法 Keil C编译器常见警告与错误信息的解决方法

    Keil C编译器常见警告与错误信息的解决方法 1. Warning 280:’i’:unreferenced local variable 说明 局部变量 i 在函数中未作任何的存取操作 解决方法 消除函数中 i变量的宣告 2 Warning 206:’Music3’:missing ...

    ApkIDE3.3.0.0作者原版,解决常见apk打包安装问题.rar

    AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersionCodename' in package 'android' 解决方法:在AndroidManifest.xml中删除'compileSdkVersionCodename相关的。 二、...

    org.eclipse.swt.win32

    org.eclipse.swt.SWT.class org.eclipse.swt.SWTError.class org.eclipse.swt.SWTException.class org.eclipse.swt.accessibility.ACC.class org.eclipse.swt.accessibility.Accessible.class org.eclipse.swt....

    uCOS_III例子程序+Micrium.RTOS.1.0.0.pack

    d:\Keil_v5\ARM\PACK\Micrium\RTOS\1.0.0\Software\uCOS-II\Ports\ARM-Cortex-M3\Generic\RealView\os_cpu_c.c(258): error: #20: identifier "p_stk" is undefined 在os_cpu_c.c中增加变量OS_STK_DATA *p_stk_data...

    Unitils-jar包

    Unitils 测试框架目的是让单元测试变得更加容易和可维护。Unitils 构建在DbUnit 与 ...进行测试并提供与Spring 和Hibernate 相集成。Unitils 设计成以一种高度可配置和松散耦 合的方式来添加这些服务到单元测试中

    Hibernate注释大全收藏

    Hibernate注释大全收藏 声明实体Bean @Entity public class Flight implements Serializable { Long id; @Id public Long getId() { return id; } public void setId(Long id) { this.id = id; } } @Entity ...

    The Digital Object Identifier initiative: metadata implications

    The Digital Object Identifier initiative: metadata implications Context/status information The purpose of this document is to generate a DOI Foundation consensus paper on metadata, as a companion ...

    java.sql.SQLSyntaxErrorException:

    背景: 同事在上传文件时碰到这样一个数据库报错,上传文件大小为10M。 java.sql.SQLSyntaxErrorException: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size….. ...

    高性能消息传输机制Aeron.zip

    会话ID Session ID: A unique identifier for a Session.频道 Channel: A transmission media needs to have a means of identifying a flow of data and the addressing model of the media. For Aeron, this ...

    App上线提交详细过程

    5. Bundle Identifier (App ID Suffix) 6. 选择服务 二、 生成Provisioning Profiles 1. 生成development Provisioning Profiles,用于真机调试 1.1. 新增Provisioning Profiles 1.2. 选择Provisioning Profiles...

    jquery中ajax请求后台数据成功后既不执行success也不执行error的完美解决方法

    jquery中ajax请求后台数据成功后既不执行success也不执行error,此外系统报错:Uncaught SyntaxError: Unexpected identifier at Object.success,但后台能够返回数据,原代码如下: var source=[]; $.ajax({ ...

    Oracle数据库表名支持的最大长度是多少

    本文介绍Oralce数据库中,表名可以使用的最大长度。这个长度也是Oracle...*Cause: An identifier with more than 30 characters was specified. *Action: Specify at most 30 characters. 从这个错误提示可以看出

    PC-IDENTIFIER-09.01.00.00-01.17.00.15

    KB2558 Desigo CC 2.1 SR1, ABT-Pro, XWP: Lease time of S7DOS expired at 31.12.2015 https://support.industry.siemens.com/cs/us/en/view/109482349

    hibernate3.6 文档(pdf 格式)

    1.1. Part 1 - The first Hibernate Application ................................................................ 1 1.1.1. Setup .............................................................................

    Keil MDK 编译 ucOS-II 出现的警告和错误解决

    Keil MDK 编译 ucOS-II 出现的警告和错误解决 在使用 Keil MDK 编译 ucOS-II 时,可能会出现一些警告和错误。本文将总结这些问题的解决方法。 警告:A1876W:Use of '|' as a synonym for the :OR: operator is ...

    (完整word版)C语言程序编译常见错误对照.doc

    C语言程序编译常见错误对照 C语言程序编译常见错误对照是指在C语言程序编译过程中可能出现的错误类型及其对照描述。本文将详细介绍C语言程序编译常见错误对照,帮助开发者快速定位和解决编译错误。 1. fatal error...

    HibernateAPI中文版.chm

    HIBERNATE - 符合Java习惯的关系数据库持久化 Hibernate参考文档 3.2 -------------------------------------------------------------------------------- 目录 前言 1. 翻译说明 2. 版权声明 1. Hibernate...

    apktool_AndResGuard:修复apktool打包出现No resource found...

    No resource identifier found for attribute... No resource found that matches the given name..... ....... 使用apktool-2.0.3也可以回编译,但是比如微信回编译后会增加到110M左右,很不友好。 而使用apktool-...

Global site tag (gtag.js) - Google Analytics