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