subset « Collection « JPA Q&A





1. how to have getChildren() return a subset of the Collection?    forum.hibernate.org

Hi, I have a Child / Parent relationship. Only children have a property (ryear). When I do parent.getChildren(), I would like to only receive the children WHERE RYEAR='2003' I have this condition harcoded in the mapping, it works fine, but I don't want to hardcode it. I have searched the doc + this forum, but I can't find a way to ...