ClassCastException for JPA query that tries to return the object queried in an inner SELECT statement
I have the following JPA query that attempts to find all the Children of a Parent object that fit under certain conditions, and then get only the first one of them under different partitions: