The root issue for the one in PLINK-327 seems to be that Apache OpenJPA is generating an incorrect query.
The example works fine on EclipseLink/Hibernate