Creating a criteria query with e.g. an entity join and later calling From#getJoins will lead to a class cast exception because the collection contains the entity join which is not castable to Join. After internal discussions, we agreed on filtering the contents of From#getJoins to contain only the elements that are assignable to that interface. |