Why the documentation of Hibernate reccomend to use the class for Lazy Initialization and not the interface?
Infact:
"The mapping file declares a class or interface to use as the proxy interface for that class. The recommended approach
is to specify the class itself" (
Chapter 12.1)
But in the same Chapter 12.1 there are 4 reason to use Interface:
1. "Firstly, instances of Cat will never be castable to DomesticCat, even if the underlying instance is an instance of
DomesticCat."
2. "Secondly, it is possible to break proxy ==."
3. "Third, you may not use a CGLIB proxy for a final class or a class with any final methods."
4. "if your persistent object acquires any resources upon instantiation (eg. in initializers or default constructor),
then those resources will also be acquired by the proxy. The proxy class is an actual subclass of the
persistent class."