JPA 2.1 has been released recently and a new feature seems to be on conditions.
I found it mentioned in some blogs and the Eclipselink documentation.
How can I make use of this?
I have two entities linked to each other with @OneToMany and @JoinColumn. However I have to filter out some of the second entities.
The blog sample shows:
SELECT s.name, COUNT(p)
FROM Suppliers s LEFT JOIN s.products p
ON p.status = 'inStock'
GROUP BY s.name
How can I make use of this for my mappings?