This commit is contained in:
2024-11-18 12:49:25 +01:00
parent 14b5142394
commit 576c5155d9
6 changed files with 59 additions and 2 deletions
@@ -46,6 +46,10 @@ public class Registration implements Serializable {
@JsonIgnoreProperties(value = { "registrations", "transactions" }, allowSetters = true)
private Event event;
@ManyToOne(fetch = FetchType.EAGER)
@JsonIgnoreProperties(value = { "users", "transactionItems" }, allowSetters = true)
private UserAccount userAccount;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "registration")
@JsonIgnoreProperties(value = { "userAccount", "transaction", "event", "registration" }, allowSetters = true)
private Set<TransactionItem> transactionItems = new HashSet<>();
@@ -143,6 +147,19 @@ public class Registration implements Serializable {
return this;
}
public UserAccount getUserAccount() {
return this.userAccount;
}
public void setUserAccount(UserAccount userAccount) {
this.userAccount = userAccount;
}
public Registration userAccount(UserAccount userAccount) {
this.setUserAccount(userAccount);
return this;
}
public Set<TransactionItem> getTransactionItems() {
return this.transactionItems;
}