Once again I'm to ask your precios help to solve a problem with Hibernate, Springboot, Postgresql. In my project I have dozens of tables I read and write on, I've used same configuration for every tables without problems, but I'm having some problems with one of them:
This is the Class mapping my table:
package com.mycompany.ingestion.entities.mappingdb;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name="td_titauto")
public class TdTitAuto {
@Id
@SequenceGenerator(name = "seq_td_titauto", sequenceName = "seq_td_titauto", allocationSize=1)
@GeneratedValue(generator = "seq_td_titauto", strategy = GenerationType.SEQUENCE)
private Long idTitAuto;
private String idAuto;
public Long getIdTitAuto() {
return idTitAuto;
}
public void setIdTitAuto(Long idTitAuto) {
this.idTitAuto = idTitAuto;
}
public String getIdAuto() {
return idAuto;
}
public void setIdAuto(String idAuto) {
this.idAuto = idAuto;
}
}
When I run the project, I got following error: ERROR: column tdtitauto0_.id_tit_auto does not exist Hint: Perhaps you meant to reference the column "tdtitauto0_.id_titauto".
The name of the table on DB is td_titaut. If I add the name of the schema on the annotation @Table, nothing changes, but If I remove the @Table annotation, I got the following error:
ERROR: relation "td_tit_auto" does not exist In this case I have no idea why an underscore char is added (the table is named td_titauto with just one underscore).
I've tried also to use a config file instead and as well as annotation, but nothing change. Any suggestions? Thank you so much, I really appreciate My best regards Steph