Skip to content

Commit b6808e5

Browse files
feat: update AccountReseller entity to include orphanRemoval for agents relationship
Signed-off-by: Mario Serrano <[email protected]>
1 parent e15a279 commit b6808e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sources/core/src/main/java/tools/dynamia/modules/saas/domain/AccountReseller.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
public class AccountReseller extends BaseEntity {
3535

3636

37-
3837
@NotEmpty
3938
private String name;
4039
private String identification;
@@ -45,7 +44,7 @@ public class AccountReseller extends BaseEntity {
4544
@ManyToOne
4645
private Account mainAccount;
4746
private double comissionRate;
48-
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
47+
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true, mappedBy = "reseller")
4948
private List<AccountResellerAgent> agents = new ArrayList<>();
5049
@Temporal(TemporalType.DATE)
5150
private Date startDate = new Date();

0 commit comments

Comments
 (0)