'ReactiveCrudRepository doesn't create table in database in spring boot

when i change the table name in a entity class, how should the Repository know what table to map

i have a Class called Car and i created CarDAO to access The databse , i want the name of the table to be car

ok the CarDTO i have :

@Entity(name = "car")
@Table(schema = "car",name = "car")
@Getter
@Setter
@RequiredArgsConstructor
@AllArgsConstructor
public class CarDAO { 

nothing happen in the database

i tried to using a script sql

CREATE TABLE IF NOT EXISTS car
(
    plat_number varchar(255) primary key,
    type varchar(255) not null ,
    release_date DATE not null
    );

the tabel is created in the initialization but when any opration happen

i get this error

MESSAGE=relation "car_dao" does not exist, POSITION=69, FILE=parse_relation.c, LINE=1381, ROUTINE=parserOpenTable 

my repository car is:

@Repository
public interface DatabaseCarRepository extends ReactiveCrudRepository<CarDAO, Long> {


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source