Skip to content

Commit

Permalink
Closes #289 Loading player achievements very slow
Browse files Browse the repository at this point in the history
  • Loading branch information
bukajsytlos authored and Brutus5000 committed Jan 6, 2019
1 parent 15b5144 commit 2a08217
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
Expand Down Expand Up @@ -43,13 +42,13 @@ public int getPlayerId() {
return playerId;
}

@ManyToOne(fetch = FetchType.LAZY)
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "player_id", insertable = false, updatable = false)
public Player getPlayer() {
return player;
}

@OneToOne
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "achievement_id")
public Achievement getAchievement() {
return achievement;
Expand Down

0 comments on commit 2a08217

Please sign in to comment.