Amol Katyare wrote: If you are looking for why targetEntity is used - it is meant for giving the name of the class when class is not mentioned on generics.
Ok I understand that
But in
Java and Generics there is something like Type erasure
wiki wrote: "Generics are checked at compile-time for type correctness. The generic type information is then removed via a process called type erasure. For example, List<Integer> will be converted to the raw type (non-generic type) List, which can contain arbitrary objects. "
(wikipedia)
And my question is what is different between generics and not generics if Java/JPA checks types in runtime?
Regards