0

Chapter 5, Basic O/R Mapping of hibernate DOCs says: at section 5.1.3. Class

You can declare a persistent class using the class element. For example:

<class
    ...
    proxy="ProxyInterface"                        (7)
    ...
/>

with the short comment:

proxy (optional): specifies an interface to use for lazy initializing proxies. You can specify the name of the class itself.

Is there any example, specification, or a little more explanation of this interface usage?

user2602807
  • 1,232
  • 2
  • 15
  • 28
  • "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." What do look forward in an example ? – Andy Dufresne Dec 30 '14 at 05:13
  • My english is not very well. What did you mean with your last question? – user2602807 Dec 30 '14 at 07:44
  • The text in my comments helps you understand the use of proxy attribute? – Andy Dufresne Dec 30 '14 at 08:39
  • I have already read this comment, but I can't understand usages of this "ProxyInterface", can I implement it by myself? And where is the specification of this interface? – user2602807 Dec 30 '14 at 08:53

0 Answers0