jpablog : delete post cascade
This commit is contained in:
@@ -34,7 +34,7 @@ public class Board {
|
||||
@JoinColumn(name = "user_id")
|
||||
private User user;
|
||||
|
||||
@OneToMany(mappedBy = "board")
|
||||
@OneToMany(mappedBy = "board", cascade = CascadeType.REMOVE)
|
||||
@JsonIgnoreProperties({"board"})
|
||||
@OrderBy("id desc")
|
||||
private List<Reply> replies = new ArrayList<>();
|
||||
|
||||
@@ -20,8 +20,12 @@ let index = {
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json"
|
||||
}).done(function (resp){
|
||||
console.log(resp);
|
||||
alert("회원가입이 완료되었습니다.");
|
||||
if (resp.statusCode === 500) {
|
||||
alert("회원가입 실패.");
|
||||
} else {
|
||||
alert("회원가입 완료.");
|
||||
}
|
||||
|
||||
location.href = "/";
|
||||
}).fail(function (error){
|
||||
alert(JSON.stringify(error));
|
||||
|
||||
Reference in New Issue
Block a user