키마 검증:누락 열[컨텐트 아이템에 기초하여 비실시간]에서 테이블[process_event]. 지

0

질문

내 springboot 용은 다음과 같 모델

@Table(name = "process_event", indexes = [
    Index(name = "pe_eventId_idx", columnList = "eventId")
])
@Entity
internal class ProcessEvent {
    @EmbeddedId
    var id: ProcessEventId? = null
}

@Embeddable
internal class ProcessEventId : Serializable {
    @Column(name = "processId", nullable = false, length = 100)
    var processId: String? = null

    @Column(name = "eventId", nullable = false, length = 100)
    var eventId: String? = null

    override fun hashCode(): Int = Objects.hash(processId, eventId)
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (other == null || Hibernate.getClass(this) != Hibernate.getClass(other)) return false

        other as ProcessEventId

        return processId == other.processId &&
                eventId == other.eventId
    }

    companion object {
        private const val serialVersionUID = 2616696968741078700L
    }
}

응용 프로그램을 실행하는 다음 오류를 제공합니다 Failed to initialize JPA EntityManagerFactory: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [event_id] in table [process_event]

모델 생성을 사용하여 intellij. 아무 생각이 왜 이 오류가 있습니다. 어떤 도움을 주시기 바랍니다?

hibernate kotlin spring-data-jpa
2021-11-23 18:03:48
1

최고의 응답

0

이어를 추가하여 해결의 명명 전략

jpa:
    hibernate:
      ddl-auto: validate
      naming.physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

2021-11-24 08:59:16

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................