Has:
class Container {
@Id
@Column(name="id")
protected long id;
@OneToMany
@JoinColumn(name="container_id", nullable=false)
protected Collection<Content> contents = new ArrayList<Content>();
}
and
class Content {
@Id
@Column(name="id")
protected long id;
@Column(name="link_id")
protected long linkId;
}
What JPQL query will get Content entities that are in Container with certain id and with certain linkId?