Monday 25 May 2015

Comments are Implemented

The video below proudly demonstrates the commenting functionality I have been implementing this weekend for the blog platform.

Comments have a one to many relationship with posts.



I have used cascade on delete so that a post can be deleted without the need to delete each of its comments first. The JPA withing the Java looks like this:

Commnet.java
    [...]
    @NotNull
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="POST_ID")
    private Post post;
    [...]

I cannot wait to start using the new blog platform now it is almost finished.

No comments:

Post a Comment