Hello,

I am looking for a way to filter a set while loading it into an
object.  For example, if class Shape contains a reference to a set of
Drawings but the drawings are never deleted from the database but
retired instead.  How do I fill the attribute Shape.activeDrawings?

The JPQL-like way of doing this would be:

SELECT d FROM Drawing d WHERE d.shape.id = ? and d.retirementDate is null

but how do I create a mapping that does the same thing?

Thanks in advance!

Christian

Reply via email to