使用的表型弹簧靴的最大行数。

你好,我使用spring boot,我需要在mysql服务器上创建我的实体,但我reselve错误。

** 原因是:java.sql.SQLSyntaxErrorException: Row size too large. 使用的表类型的最大行大小,不包括BLOBs,是65535。这包括存储开销,请查看手册。你必须将一些列改为TEXT或BLOBs**。

我应该做什么来创建我的数据库,请!

classe是:

@Entity
public class rfpobject {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;
private int ide;
private String unit;
private String rfpid;
private String requestid;
private String incoming;
private String projecttitle;
private String serviceline;
private String businessunit;
private String requsitionbusinessunit;
private String country;
private String targetpropose;
private int rfx;
private String workflowtracking;
private String protocol;
private String jourfixkunde;
private String rejectedstatus;
private String closedreason;
private String practice;
private String startdate;
private String enddate;
private String vertragsart;
private String rfpcomment;
private double persondays;
private String accountexecutive;
private String accountsalesmanager;
private String expertsales;
private String deliveryunit;
private String deliveryresponsible;
private String requisitioner;
private String procurement;
private String referencenumber;
private int atoscontractno;
private String candidates;
private String itec;
private String tcv;
private String updated;
private String updatedby;
private String portfolio;
private String path;
private String rmprotocol;
private int rm;
private String wfm_id;
private String needconfopart;
private String confirmationofparticipation;
private String propose;
private String lastcall;
private String lastcalldate;
private String skills;
private String leistungserbringung;
private String rollefunktion;
private String inhaltscope;
private String laufzeitperspektive;
private String laufzeitangefragt;
private String phase;
private String fristverlaengerung;
private String closedstatus;
private String deferred_till;
private int sipa_yn;
private String po_no;
private int nessie_no;
private String number_of_persons;
private String att_job_site;
private String att_language;
private String att_main_topics;
private String ref_rfpid;
private String ref_history;
private String ref_rejections;
private String rv_rej_status_details;
private String rv_alliance_manager;
private String rv_final_status;
private String rv_cust_list_date;
private String rv_final_note;
private String rv_atos_root_causes;
private String currency;
private String externalid;
private String resultstatus;
private String reasoncode;
private String sysid;
private String ncrm_comment;
private String idemand_comment;
private String offshore_comment;
private String rv_rc_updby;
private String rv_rc_date;
private String rv_finalcomment;
private String rv_finaldate;
private double tcv_euro;
private int rem_active;
private int rem_send;
private int remcop_active;
private int remcop_send;
private String idemand;
private String idemand_url;
private int labour_leasing_yn;
private String cas_no;
private String prolongation;
private String rv_skills_miss_1;
private String rv_skills_miss_2;
private String rv_skills_miss_3;
private String ref_renewal_date;

所以,当我exute我得到错误行大小太大应用propreties 。

spring.datasource.url=jdbc:mysql://localhost:3306/atos1?useSSL=false
spring.datasource.username=root
spring.datasource.password=
spring.jpa.hibernate.ddl-auto=create
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

解决方案:

每个字符串都会产生一个 VARCHAR(255) 列。

而你有很多人。这将导致错误。

你有两个选择。

1) 定义列的大小

@Column(length = 20)
private String unit;

@Column(columnDefinition= "VARCHAR(20)")
private String unit;

2)不要让Hibernate创建表,自己写DDL。

给TA打赏
共{{data.count}}人
人已打赏
解决方案

如何用非数字值对数据框进行分组和透视。

2022-4-20 20:00:10

解决方案

谷歌DLP用户定义的敏感数据输出

2022-4-20 20:00:12

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索