Skip to content

Commit

Permalink
Test fix for sql generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Pelayori committed Mar 4, 2024
1 parent bab3d5e commit e47584a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/uniovi/entities/ApiKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ApiKey {
private String key = UUID.randomUUID().toString();

@OneToOne(mappedBy = "apiKey")
private Player user;
private Player player;

@OneToMany(mappedBy = "apiKey")
private Set<RestApiAccessLog> accessLogs = new HashSet<>();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/uniovi/entities/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class Player implements JsonEntity {
@OneToMany(mappedBy = "player", cascade = CascadeType.REMOVE)
private Set<GameSession> gameSessions = new HashSet<>();

@OneToOne(cascade = CascadeType.PERSIST, mappedBy = "user")
@OneToOne(cascade = CascadeType.PERSIST, mappedBy = "player")
private ApiKey apiKey;

// Transient: no se almacena en la base de datos
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spring.datasource.url=jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}
spring.datasource.username=${MYSQL_USER}
spring.datasource.password=${MYSQL_PASSWORD}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=create
spring.jpa.hibernate.ddl-auto=update

# SSL Configuration
server.ssl.key-store=/certs/keystore.p12
Expand Down

0 comments on commit e47584a

Please sign in to comment.