Q:

Hibernate bidirectional mapping

I have two tables.
post

and like

doing hibernate annotation mapping between these
so the association in Post bean like....
private List<Like> likes;

@OneToMany(fetch = FetchType.LAZY, mappedBy = "post") 
    public List<Like> getLikes() {
        return likes;
    }

and in Like bean
private Post post;

 @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PostId")
    @JsonIgnore
    public Post getPost() {
        return post;
    }

Questions

Is the association is right by Post {@OneToMany} and by Like {@ManyToOne} ?
The fetch type is Lazy but still getting the dependency cycle. why?

Tried
To remove dependency cycle, I tried with

{ @XmlTransient}
{@JsonIgnore}
{@JsonManagedReference} and {@JsonBackReference}

Could you please help me, where else could the problem be? Thanks.
EDIT

Added mappedBy = "post" with @OneToMany 
Added @JsonIgnore on getPost()
marshalling to JSON and got the following exception
{org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: could not initialize proxy - no Session (through reference chain: java.util.HashMap["post"]->java.util.ArrayList[0]->com.myproject.admin.model.post.Post["likes"]->org.hibernate.collection.internal.PersistentBag[0]->com.myproject.admin.model.post.Like["user"]->com.myproject.admin.model.user.User_$$_jvst328_b["pictureId"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: could not initialize proxy - no Session (through reference chain: java.util.HashMap["post"]->java.util.ArrayList[0]->com.myproject.admin.model.post.Post["likes"]->org.hibernate.collection.internal.PersistentBag[0]->com.myproject.admin.model.post.Like["user"]->com.myproject.admin.model.user.User_$$_jvst328_b["pictureId"])
    org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.writeInternal(AbstractJackson2HttpMessageConverter.java:271)
}

A:

Is the association is right by Post {@OneToMany} and by Like {@ManyToOne} ?

No, it's not correct. What you have there is two independant associations. To make it a single bidirectional association, the OneToMany side must be the inverse side of the ManyToOne:
@OneToMany(mappedBy = "post")

Note that LAZY is the default for toMany associations.

The fetch type is Lazy but still getting the dependency cycle. why?

That has nothing to do with Hibernate, and everything to do with your JSON or XML marshaller. The fact that the association is lazy is irrelevant to it: it sees a getPost() or a getLikes() method, so it calls it. Calling it loads the post or the likes lazily and returns it/them to the marshaller, which thus marshalls the result.
The fact that you tried XML and JSON annotations is dubious: are you marshalling to JSON or to XML? With which marshaller? What code did you try? What problem did you have? Without this information, it's impossible to answer.

