Thursday, 3 November 2016

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.

Implement lazy loading in Hibernate

Lazy=false(fetching child object when fetching parent object)
Lazy=true(child object not fetching when fetching parent object)

No comments:

Post a Comment