RE: Commons Lang ToStringBuilder.reflectionToString / Hibernate question

2010-04-13 Thread Jörg Schaible
Gary Gregory wrote:

> You are correct.

However, you have to consider, that CGLIB adds itself some stuff to the 
class that will be catched then ... :-)

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



RE: Commons Lang ToStringBuilder.reflectionToString / Hibernate question

2010-04-13 Thread Gary Gregory
You are correct.

Gary Gregory
Senior Software Engineer
Seagull Software
email: ggreg...@seagullsoftware.com
email: ggreg...@apache.org
www.seagullsoftware.com 



> -Original Message-
> From: Thomas P. Fuller [mailto:thomas.ful...@coherentlogic.com]
> Sent: Tuesday, April 13, 2010 10:56
> To: user@commons.apache.org
> Subject: Commons Lang ToStringBuilder.reflectionToString / Hibernate question
> 
> Hi Folks,
> 
> I have a brief question about the Commons Lang
> ToStringBuilder.reflectionToString method:
> 
> If I override the toString method as follows:
> 
> @Override
> public String toString() {
> return ToStringBuilder.reflectionToString(this);
> }
> 
> for a Hibernate CGLIB-enhanced bean, my understanding is that this will *not*
> call the database because the reflectionToString method is accessing the
> fields directly and not the getter methods.
> 
> Can you please clarify if I am correct?
> 
> Thanks for your help,
> 
> Tom