What is Hibernate proxy?- Mapping of classes can be made into a proxy instead of a table. A proxy is returned when actually a load is called on a session. The proxy contains actual method to load the data. The proxy is created by default by Hibernate, for mapping a class to a file. The code to invoke Jdbc is contained in this class.What is Hibernate proxy?- The proxy attribute enables lazy initialization of persistent instances of the class.
- Hibernate will initially return CGLIB proxies which implement the named interface.
- The actual persistent object will be loaded when a method of the proxy is invoked.
|