hibernate+mysql 自动生成数据库问题
时间:2021-07-01 10:21:17
帮助过:3人阅读
package com.pera.report.designer.data;
2
3 import java.sql.Clob;
4
5 import javax.persistence.Basic;
6 import javax.persistence.Column;
7 import javax.persistence.Entity;
8 import javax.persistence.FetchType;
9 import javax.persistence.Lob;
10 import javax.persistence.Table;
11
12 import com.pera.maframework.core.common.entity.IdEntity;
13
14 /**
15 * XML保存数据库
16 *
17 * @author zcj
18 *
19 * @Time 2015-8-17 14:21
20 */
21 @Entity
22 @Table(name = "qreport_Xml"
)
23 public class ReportXml
extends IdEntity
implements java.io.Serializable {
24 /**
25 *
26 */
27 private static final long serialVersionUID = 8362245934322337549L
;
28
29 private Clob reportXml;
30
31 private String reportName;
32
33 private String reportMemo;
34
35 @Lob
36 @Basic(fetch =
FetchType.EAGER)
37 @Column(name = "reportXml", columnDefinition = "TEXT", nullable =
true)
38 public Clob getReportXml() {
39 return reportXml;
40 }
41 public void setReportXml(Clob reportXml) {
42 this.reportXml =
reportXml;
43 }
44
45 @Column(name = "reportName"
)
46 public String getReportName() {
47 return reportName;
48 }
49 public void setReportName(String reportName) {
50 this.reportName =
reportName;
51 }
52
53 @Column(name = "reportMemo"
)
54 public String getReportMemo() {
55 return reportMemo;
56 }
57 public void setReportMemo(String reportMemo) {
58 this.reportMemo =
reportMemo;
59 }
60 }
View Code
解决方法:
http://blog.csdn.net/mlx212/article/details/23828151
或都改为小写,重新生成!
hibernate+mysql 自动生成数据库问题
标签: