-
1. Re: problem with CGLIB
olivier_debels Dec 12, 2006 5:40 AM (in response to fleury)Indeed, you get a hibernate proxy. You can change this behaviour by changing the mapping (switching off lazy retrieval) or get the real object from the proxy.
See:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=94900 -
2. Re: problem with CGLIB
fleury Dec 12, 2006 5:54 AM (in response to fleury)Thank you very much for your quick reply. I'm going to try your solution. But anyway, why do we get a proxy object ? The association to the node is not mapped as proxy. I know it is a hibernate question but still...
LF -
3. Re: problem with CGLIB
tom.baeyens Dec 12, 2006 6:29 AM (in response to fleury)hibernate does lazy loading by default (which is good)
-
4. Re: problem with CGLIB
olivier_debels Dec 12, 2006 6:35 AM (in response to fleury)Indeed,
For many-to-one relation (of which this is an example) the lazy mapping property defaults to 'proxy'.
you can change this one to "false" and choose the fetching strategy you like (fetch mapping property) to change this.
See http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html -
5. Re: problem with CGLIB
fleury Dec 12, 2006 8:14 AM (in response to fleury)Thanks a lot for these clear explanations.
Best regards,
LF