Изменение подхода к уведомлениям

This commit is contained in:
Struchkov Mark 2024-08-26 18:01:23 +03:00
parent 57c787bf01
commit 214c0401ac
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C
2 changed files with 12 additions and 1 deletions

View File

@ -117,6 +117,17 @@ public class MergeRequest {
@Column(name = "is_reviewer") @Column(name = "is_reviewer")
private boolean userReviewer; private boolean userReviewer;
@OneToMany(
fetch = FetchType.LAZY,
cascade = {CascadeType.PERSIST, CascadeType.MERGE}
)
@JoinTable(
name = "merge_request_approvals",
joinColumns = @JoinColumn(name = "merge_request_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "person_id", referencedColumnName = "id")
)
private List<Person> approvals = new ArrayList<>();
@ElementCollection @ElementCollection
@CollectionTable(name = "merge_request_label", joinColumns = @JoinColumn(name = "merge_request_id")) @CollectionTable(name = "merge_request_label", joinColumns = @JoinColumn(name = "merge_request_id"))
@Column(name = "label") @Column(name = "label")

View File

@ -8,7 +8,7 @@ spring:
change-log: classpath:liquibase/changelog.xml change-log: classpath:liquibase/changelog.xml
jpa: jpa:
show-sql: false show-sql: false
open-in-view: false # open-in-view: false
hibernate: hibernate:
ddl-auto: none ddl-auto: none
properties: properties: