Robert, thanks for the quick response. I submitted a bug to Bugzilla (
http://issues.apache.org/bugzilla/show_bug.cgi?id=39460), though without a
unit test yet since I'm having trouble getting the Betwixt test harness
working.

Anyway, my basic use case involves properties that have setters with formal
parameter type 'Object': if I try to write such a bean that happens to have
a String as the value of such a property, BeanWriter will not write the
className property even though I've un-suppressed the className property in
general. Then when a BeanReader tries to reconstruct the object, it creates
a plain Object instead of a String (this also happens with Integer, etc.).

I can create wrappers for those types to work around the problem, but it
really messes up my code -- especially since this issue affects more than
one of my bean types. I thought of modifying Betwixt to no longer treat
Strings, etc. as simple types, but would BeanWriter still know how to write
them to XML in that case?

-Mike

On 5/1/06, robert burrell donkin <[EMAIL PROTECTED]>
wrote:

On Sat, 2006-04-29 at 14:51 -0500, Michael Gardner wrote:
> I've un-suppressed the className attribute for all beans, but it doesn't
> seem to get outputted for Strings and Integers (presumably because those
are
> handled specially, not being true beans).

yep: mapped to simple rather than complex xml types

> How can I get betwixt to use className for these, too?

a good question and i need some more information  :)

could you describe a bit more about you particular use case?

(it would be great if you could contribute a unit test demonstrating
your use case for use in the code base: please use bugzilla since this
list strips most attachments)

Reply via email to