0

I have this code:

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

@Entity
@Table(name = "my_table")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TrainingData {

    @Column(name = "RECORD_DATE_PARSED")
    private LocalDate recordDate;

    @Column(name = "SENDER_POSTOFFICECODE")
    private String senderPostOfficeCode;
}

This is sending to SQL query columns with names: "RECORD_DATE" and "SENDER_POST_OFFICE_CODE" How can i turn off auto adjust column title based on variable?
And have this error:

oracle.jdbc.OracleDatabaseException: ORA-00904: "C1_0"."RECORDDATE": ???????????? ?????????????

I tried to turn it off using application.yml:

spring:
  jpa:
    hibernate:
      naming:
        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

But nothing helped( Because my column names changed to: "RECORDDATE" and "SENDERPOSTOFFICECODE"

  • Sorry but I don't understand your question. Can you specify exaclty what name do you expect and what do you actually got? – Kaiak Apr 28 '23 at 11:13

0 Answers0