0
package com.example.demoo.domain;

import jakarta.persistence.*;

@Entity(name = "RedFlag")
@Table(name = "RedFlag")
public class RedFlag {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "red_flag_id")
    private Long red_flag_id;

    @ManyToOne
    @JoinColumn(name = "client_id")
    private DefClient client_id;

    @Column(name = "red_flag_description", nullable = false)
    private String red_flag_description;

    @Column(name = "active")
    private Boolean active;

    public RedFlag() {
    }

    public Long getRed_flag_id() {
        return red_flag_id;
    }

    public void setRed_flag_id(Long red_flag_id) {
        this.red_flag_id = red_flag_id;
    }

    public DefClient getClient_id() {
        return client_id;
    }

    public void setClient_id(DefClient client_id) {
        this.client_id = client_id;
    }

    public String getRed_flag_description() {
        return red_flag_description;
    }

    public void setRed_flag_description(String red_flag_description) {
        this.red_flag_description = red_flag_description;
    }

    public Boolean getActive() {
        return active;
    }

    public void setActive(Boolean active) {
        this.active = active;
    }
}

Here's the code of one of the Entities that i created using spring boot to generate the db for Postgresql. But as you all see in the image the names are converted like "DefUser" to "def_user". I tried chatgpt youtube google or even old posts of stack overflow but nothing helped.
I also tried to configure application.properties and postgresql.conf .

Corentin
  • 2,442
  • 1
  • 17
  • 28

0 Answers0