criteria « Relationship « JPA Q&A





1. jpa criteria for many to many relationship    stackoverflow.com

I have 2 POJO classes in Java, Answer and Collaborator, in a many-to-many relationship.

class Answer{
@ManyToMany(cascade = CascadeType.ALL)
    @JoinTable(name = "ANSWERS_COLLABORATORS", joinColumns = { @JoinColumn(name = "aid") }, inverseJoinColumns ...

2. Criteria with one to many relationship    forum.hibernate.org

Hi Java friends. I have this particular problem, maybe you can help me. I have an entity Person and one person can have many kids. What i try to do is, when i receive one kid, i try to find her mother. So its like this Criteria.add(Restrictions.eq("Kids", kid)) But i think they are matching this kid with the collection (Set) of ...

3. JPA / Hibernate...probema with criteria in the relationship    forum.hibernate.org

Newbie Joined: Tue Jan 13, 2009 11:04 am Posts: 13 doubts with other criteria when I query that amount where the document type 1 and the equal value CPF200 would have to return that record but only two back because that user has two records but when I getDocuments user has read the two as I do to get it? In ...

4. JPA / Hibernate...probem with criteria in the relationship    forum.hibernate.org

Newbie Joined: Tue Jan 13, 2009 11:04 am Posts: 13 doubts with other criteria when I query that amount where the document type 1 and the equal value CPF200 would have to return that record but only two back because that user has two records but when I getDocuments user has read the two as I do to get it? In ...