当前位置: 首页 > 知识库问答 >
问题:

Hibernate/JPA:无法对JDBC目标执行模式管理

司徒隐水
2023-03-14

该实体

@Entity
public class DocumentDetail {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;


//no cascade, a connectionManager save/update cant save/update a  a credential
//unidirectional mapping,
@OneToOne
@JoinColumn(name= "credential_id")
private Credential credential;

@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name = "documentDetail_id")
private List<DocumentValidation> documentValidationList;

public enum DocumentLocationType {
    Confluence, DocumentCentral, FileShare, OneDrive, SharePoint
};

@Enumerated(EnumType.STRING)
private DocumentLocationType locationType;

private String locationUrl;

共有1个答案

沈英勋
2023-03-14

错误引用了您的DocumentValidation实体:

Unable to execute schema management to JDBC target [create table DocumentValidation (id bigint not null auto_increment, key varchar(255), value varchar(255), documentDetail_id bigint, primary key (id))]

请看你的专栏:key varchar(255)

关键字不能用于列名-这会导致语法错误。

 类似资料: