diff --git a/src/main/java/com/uniovi/entities/Player.java b/src/main/java/com/uniovi/entities/Player.java index d8ae2aa5..2575c789 100644 --- a/src/main/java/com/uniovi/entities/Player.java +++ b/src/main/java/com/uniovi/entities/Player.java @@ -39,7 +39,7 @@ public class Player implements JsonEntity { @OneToMany(mappedBy = "player", cascade = CascadeType.REMOVE) private Set gameSessions = new HashSet<>(); - @OneToOne(cascade = CascadeType.ALL) + @OneToOne(cascade = CascadeType.ALL, mappedBy = "player") private ApiKey apiKey; // Transient: no se almacena en la base de datos