commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Wood <jas...@auto-trol.com>
Subject RE: [betwixt] How can I make betwixt accept any attribute "id" as an element id?
Date Fri, 07 Jan 2005 17:10:06 GMT
do you want to make the id your from your bean an attribute or id the
betwixt generated?

-----Original Message-----
From: Christian Aust [mailto:christian@wilde-welt.de]
Sent: Friday, January 07, 2005 11:00 AM
To: commons-user@jakarta.apache.org
Subject: [betwixt] How can I make betwixt accept any attribute "id" as
an element id?


Hi,

I'd like to use betwixt to serialize data beans to xml. Those beans 
represent database structures mapped with hibernate, so all of the 
first-rank entities sport some property id, just like this:

public long getId()

Those classes implement equals() as such it considers two elements equal 
if their id matches. Unfortunately, while serializing large object trees 
betwixt doesn't see this and assinges new id values to those instances.

<object id="100">
	<id>17</id>
</object>

What do I have to do in order to make betwixt recognize those id 
attributes as element ids? Thanks a lot and best regards,

-  Christian Aust

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

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


Mime
View raw message