JPA PROBLEME DE MAPPING

tophe110 Messages postés 16 Date d'inscription vendredi 4 mars 2022 Statut Membre Dernière intervention 31 juillet 2022 - Modifié le 4 mars 2022 à 20:28
Bonjour, j'ai un souci lorsque je lance mon projet sur les cles etrangeres sur le mapping

Class Utilisateur :
@ManyToOne
@JoinColumn( name="id_photo_profil" )
private Photo_pofil photo_profil;

Class Photo_profil
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id_photo_profil;
@Lob
private byte[]image;
@Column
private String nom;



dans MYSQL voici mes deux TABLES:


CREATE TABLE PHOTO_PROFIL(
id_photo_profil BIGINT NOT NULL AUTO_INCREMENT,
image LONGBLOB NOT NULL,
nom VARCHAR(50),
PRIMARY KEY(id_photo_profil)
)ENGINE=InnoDB;

CREATE TABLE UTILISATEUR(
id_utilisateur BIGINT NOT NULL AUTO_INCREMENT,
NOM VARCHAR(25) NOT NULL,
PRENOM VARCHAR(25),
SEXE CHAR(1) NOT NULL,/*H, F*/
DATE_NAISSANCE date NOT NULL,
MAIL VARCHAR(40),
TELEPHONE VARCHAR(10),
PASSWORD varchar(50),
id_photo_profil BIGINT NOT NULL,
PRIMARY KEY(id_utilisateur),
FOREIGN KEY (id_photo_profil) REFERENCES PHOTO_PROFIL (id_photo_profil)


et la reponse quand je lance SPRINGBOOT
Hibernate:

alter table utilisateur
add constraint FKahxawrxob6qpsbdj0x8qv5p8r
foreign key (id_photo_profil)
references photo_pofil (id_photo_profil)


je ne comprends pas du tout d'ou vient l'erreur pourriez vous m'aider s'il vous plait ?