The Solution... is simple...
When you get the List back cast it into a specific type. For example:
Query q = em.createQuery("SELECT OBJECT(p) FROM PuzzleBox p");A rather elegent solution... alternatively you can have a more complex version such as
puzzles = q.getResultList();
puzzles = new ArrayList (q.getResultList);
This works because an ArrayList can accept a Collection as noted in the Javadocs:
ArrayList(Collection<? extends E> c)
The last and most inelegent solution is to annotate the methods which use the generic List of Objects to suppress the complier warnings with a @SuppressWarnings("unchecked") annotation.