-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: EnhancerByCGLIB appears in the XML generation
PostPosted: Mon Aug 22, 2005 12:58 pm 
Newbie

Joined: Mon Aug 22, 2005 12:24 pm
Posts: 4
Hi Hibernate Experts,

I'm hibernate newbie, im using Hibernate v3, my database is postgreSQL..

I'm having this EnhacerByCGLib in my xml generation using XStream, not sure if this is the right place to ask but maybe someone has a solution for this..Besides EnhacerByCGLib phrases, a lot of unwanted methods appear in the xml as well..I've changed my POJO's into public access but it displays more tags...I'm not getting any of this tags in the other part of xml..

<housingHistory class="set">
-
<houseHistory>
<id>1</id>
<classmate reference="../../.."/>
-
<facility class="Facility--EnhancerByCGLIB--37d0e77f" resolves-to="org.hibernate.proxy.SerializableProxy">
<entityName>Facility</entityName>
<persistentClass>Facility</persistentClass>
-
<interfaces>
<java-class>org.hibernate.proxy.HibernateProxy</java-class>
</interfaces>
<id class="long">1</id>
<getIdentifierMethodClass>Facility</getIdentifierMethodClass>
<setIdentifierMethodClass>Facility</setIdentifierMethodClass>
<getIdentifierMethodName>getFacilityId</getIdentifierMethodName>
<setIdentifierMethodName>setFacilityId</setIdentifierMethodName>

<setIdentifierMethodParams>
<java-class>java.lang.Long</java-class>
</setIdentifierMethodParams>
</facility>
</houseHistory>
</housingHistory>

I'm expecting a simple xml like this: How can i eliminate those other tags?

<housingHistory class="set">
<houseHistory>
<id>1</id>
<classmate reference="../../.."/>
<facility>
<id>1</id>
<name>Name of University </name>
</facility>
</houseHistory>
</housingHistory>


Hope someone could shed light on this..many thanks..


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 22, 2005 7:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
XStream is seeing the class proxy and serialising it to XML. Its good that your using lazy loading features. Other than the size of the XML, why is this a problem for you?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 22, 2005 9:22 pm 
Newbie

Joined: Mon Aug 22, 2005 12:24 pm
Posts: 4
Hi,

I'm going to use the generated xml in web service application..so i need a clean xml results..I'll be also using the xml into xsl transformation into a html..

I wonder why in this portion of my xml i got this CGLIB generation problem..because in other parts of my xml , i don't have this unwanted tags that was generated by CGLIB i guess..

Thanks a lot!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.