Commit ef1e011 1 parent 4e8cfeb commit ef1e011 Copy full SHA for ef1e011
File tree 2 files changed +13
-2
lines changed
core/core-domain/src/main/java/com/sponus/coredomain/domain
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,11 @@ public class Bookmark extends BaseEntity {
34
34
@ Column (name = "bookmark_id" )
35
35
private Long id ;
36
36
37
- @ ManyToOne (fetch = FetchType .LAZY , cascade = CascadeType . REMOVE )
37
+ @ ManyToOne (fetch = FetchType .LAZY )
38
38
@ JoinColumn (name = "organization_id" , foreignKey = @ ForeignKey (ConstraintMode .NO_CONSTRAINT ))
39
39
private Organization organization ;
40
40
41
- @ ManyToOne (fetch = FetchType .LAZY , cascade = CascadeType . REMOVE )
41
+ @ ManyToOne (fetch = FetchType .LAZY )
42
42
@ JoinColumn (name = "target_id" , foreignKey = @ ForeignKey (ConstraintMode .NO_CONSTRAINT ))
43
43
private Organization target ;
44
44
}
Original file line number Diff line number Diff line change 1
1
package com .sponus .coredomain .domain .organization ;
2
2
3
+ import java .util .ArrayList ;
4
+ import java .util .List ;
5
+
6
+ import com .sponus .coredomain .domain .bookmark .Bookmark ;
3
7
import com .sponus .coredomain .domain .common .BaseEntity ;
4
8
import com .sponus .coredomain .domain .organization .enums .OrganizationType ;
5
9
import com .sponus .coredomain .domain .organization .enums .ProfileStatus ;
6
10
import com .sponus .coredomain .domain .organization .enums .Role ;
11
+ import com .sponus .coredomain .domain .portfolio .PortfolioImage ;
7
12
13
+ import jakarta .persistence .CascadeType ;
8
14
import jakarta .persistence .Column ;
9
15
import jakarta .persistence .DiscriminatorColumn ;
10
16
import jakarta .persistence .Entity ;
15
21
import jakarta .persistence .Id ;
16
22
import jakarta .persistence .Inheritance ;
17
23
import jakarta .persistence .InheritanceType ;
24
+ import jakarta .persistence .OneToMany ;
18
25
import jakarta .persistence .Table ;
19
26
import lombok .AccessLevel ;
20
27
import lombok .AllArgsConstructor ;
@@ -75,6 +82,10 @@ public class Organization extends BaseEntity {
75
82
@ Column (name = "is_deleted" )
76
83
private boolean isDeleted ;
77
84
85
+ @ Builder .Default
86
+ @ OneToMany (cascade = {CascadeType .ALL })
87
+ private List <Bookmark > bookmarks = new ArrayList <>();
88
+
78
89
protected Organization (
79
90
String name ,
80
91
String email ,
You can’t perform that action at this time.
0 commit comments