Hibernate没有创建表,并且会自动更改

Hibernate没有创建表,并且会自动更改,hibernate,Hibernate,尝试使用hibernate创建表,但已创建并删除该表 Console: Hibernate: `create table category (catid integer not null auto_increment, catdesc varchar(255), cattitle varchar(255), primary key (catid)) type=MyISAM` Hibernate: create table category_product (Category_catid int

尝试使用hibernate创建表,但已创建并删除该表

Console:

Hibernate: `create table category (catid integer not null auto_increment, catdesc varchar(255), cattitle varchar(255), primary key (catid)) type=MyISAM`
Hibernate: create table category_product (Category_catid integer not null, p_pid integer not null) type=MyISAM
Hibernate: create table product (pid integer not null auto_increment, pDesc varchar(255), pDiscount integer not null, pName varchar(255), pPhoto varchar(255), pPrice integer not null, pQuantity integer not null, c_catid integer, primary key (pid)) type=MyISAM
Hibernate: create table user (id integer not null auto_increment, address varchar(255), mail varchar(255), name varchar(255), pass varchar(255), ph_no integer not null, primary key (id)) type=MyISAM
Hibernate: alter table category_product drop index UK_52hqb12vl2fe0l0d78hk2d88h
Hibernate: alter table category_product add constraint UK_52hqb12vl2fe0l0d78hk2d88h unique (p_pid)
Hibernate: `alter table category_product add constraint FKsqii9ofndgvr0cscbvb5e4uds foreign key (p_pid) references product (pid)`
Hibernate: alter table category_product add constraint FK29xlj9k6tq2niv1udd6a1msmd foreign key (Category_catid) references category (catid)
Hibernate: alter table product add constraint FKsw4ctbskvoom8us7igpgu6fqt foreign key (c_catid) references category (catid)
hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<hibernate-configuration>
    <session-factory>
            <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
            <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
            <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/shoppingcart?useSSL=false</property>
            <property name="hibernate.connection.username">root</property>
            <property name="hibernate.connection.password">root123</property>
            <property name="show_sql">true</property>      
            <property name="hbm2ddl.auto">update</property>
            <mapping class="com.sourav.model.User"/>     
            <mapping class="com.sourav.model.Product"/>
            <mapping class="com.sourav.model.Category"/> 
    </session-factory>
</hibernate-configuration>

org.hibernate.dialogue.mysqldialogue
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/shoppingcart?useSSL=false
根
根123
真的
更新
模型类:

import java.util.List;

import javax.persistence.*;

@Entity
@Table(name="category")
public class Category {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int catid;
    private String cattitle;
    private String catdesc;
    @OneToMany
    private List<Product> p;
    public int getCatid() {
        return catid;
    }
    public void setCatid(int catid) {
        this.catid = catid;
    }
    public String getCattitle() {
        return cattitle;
    }
    public void setCattitle(String cattitle) {
        this.cattitle = cattitle;
    }
    public String getCatdesc() {
        return catdesc;
    }
    public void setCatdesc(String catdesc) {
        this.catdesc = catdesc;
    }
    public List<Product> getP() {
        return p;
    }
    public void setP(List<Product> p) {
        this.p = p;
    }
    public Category(String cattitle, String catdesc, List<Product> p) {
        super();
        this.cattitle = cattitle;
        this.catdesc = catdesc;
        this.p = p;
    }
    
    
}
import java.util.List;
导入javax.persistence.*;
@实体
@表(name=“category”)
公共类类别{
@身份证
@GeneratedValue(策略=GenerationType.IDENTITY)
私有int catid;
私有字符串cattitle;
私有字符串catdesc;
@独身癖
私人名单p;
public int getCatid(){
返回catid;
}
公共无效设置catid(int catid){
this.catid=catid;
}
公共字符串getCattitle(){
返回卡特尔;
}
公共void setCattitle(字符串cattitle){
this.cattitle=cattitle;
}
公共字符串getCatdesc(){
返回catdesc;
}
公共无效设置catdesc(字符串catdesc){
this.catdesc=catdesc;
}
公共列表getP(){
返回p;
}
公共无效setP(列表p){
这个,p=p;
}
公共类别(字符串cattitle、字符串catdesc、列表p){
超级();
this.cattitle=cattitle;
this.catdesc=catdesc;
这个,p=p;
}
}
Hibernate:创建表类别(catid integer not null自动增量、catdesc varchar(255)、cattitle varchar(255)、主键(catid))类型=MyISAM Hibernate:创建表category\u product(category\u catid integer不为null,p\u pid integer不为null)type=MyISAM Hibernate:创建表产品(pid integer not null自动增量、pDesc varchar(255)、pDiscount integer not null、pName varchar(255)、pPhoto varchar(255)、pPrice integer not null、pQuantity integer not null、c_catid integer、主键(pid))类型=MyISAM Hibernate:创建表用户(id integer not null auto_increment,address varchar(255),mail varchar(255),name varchar(255),pass varchar(255),ph_no integer not null,主键(id))type=MyISAM Hibernate:alter table category_product drop index UK_52hqb12vl2fe0l0d78hk2d88h Hibernate:alter table category_product add constraint UK_52hqb12vl2fe0l0d78hk2d88h unique(p_pid) Hibernate:alter table category_product添加约束FKSQI9OFNDGVR0CSCB5E4UDS外键(p_pid)引用product(pid) Hibernate:alter table category_product add约束FK29xlj9k6tq2niv1udd6a1msmd外键(category_catid)引用类别(catid)
Hibernate:alter table product add constraint FKsw4ctbskvoom8us7igpgu6fqt外键(c_catid)REFERENCE

我通过删除

<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
org.hibernate.dialogue.mysqldialogue