Title
m

MArtin

01/09/2023, 6:42 PM
Failed to initialize JPA EntityManagerFactory: Could not determine recommended JdbcType for `ar.com.school.management.models.entity.Subject` Hello everyone, I'm new with Kotlin and I'm trying to use it to make an app with Spring boot.I have just done the entities and anything else yet because I want to know if the app runs but I tried running it and it gives me the following exception "Failed to initialize JPA EntityManagerFactory: Could not determine recommended JdbcType for ar.com.school.management.models.entity.Subject"
package ar.com.school.management.models.entity

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import jakarta.persistence.*
@Entity
data class Career(@Id
              @GeneratedValue(strategy = 
              GenerationType.IDENTITY)
              @Column(name = "career_id")
              var id: Long?,

              var name: String?,

              @ManyToMany(cascade = [CascadeType.ALL], fetch = FetchType.LAZY)
              @JoinTable(name = "career_subject",
                  joinColumns = [JoinColumn(name = "career_id", referencedColumnName = "career_id")],
                  inverseJoinColumns = [JoinColumn(name = "subject_id", referencedColumnName = "subject_id")])
              @JsonIgnoreProperties("subjectCareers")
              var subjects: List<Subject>? = mutableListOf(),

              @OneToMany(mappedBy = "career")
              var students: List<Student>? = mutableListOf(),

              @ManyToMany(cascade = [CascadeType.ALL], fetch = FetchType.LAZY)
              @JoinTable(name = "career_teacher",
                  joinColumns = [JoinColumn(name = "career_id", referencedColumnName = "career_id")],
                  inverseJoinColumns = [JoinColumn(name = "teacher_id", referencedColumnName = "teacher_id")])
              @JsonIgnoreProperties("careers")
              var teachers: List<Teacher>? = mutableListOf()) {
constructor(): this(null,null,null, null, null)
}