collection « Eclipse « JPA Q&A

1. How to set collection items for in-clause in jpql?

Is there a possiblity in JPA 2.0 to set a collection for in-clause in jpql-query? (I'm using EclipseLink) The next example fails:

TypedQuery<Person> q = em.createQuery("select p from Person p where in (?1)", ...

2. Problem in managing bi-directional relationships in JPA: removing from a collection

My domain model has a self-referencing bi-directional relationship with relationship management done in the entity:

public class Users implements BaseEntity<String>, Serializable {

    private String username;

3. How to have 2 collections of the same type in JPA? (EclipseLink)

Wondering how to do what is specified in How to have 2 collections of the same type in JPA?, but with EclipseLink rather than Hibernate. See that post below: