Is there a way to make hibernate return an empty node for properties that have a null value?
For example
class Person {
Long id;
String firstName;
String lastName;
}
1,Bill,Salvucci
2,,Smith
Currently the xml document returned would look like:
<Person>
<id>1</id>
<firstName>Bill</firstName>
<lastName>Salvucci</lastName>
</Person>
<Person>
<id>2</id>
<lastName>Smith</lastName>
</Person>
I would like it to look like:
<Person>
<id>1</id>
<firstName>Bill</firstName>
<lastName>Salvucci</lastName>
</Person>
<Person>
<id>2</id>
<firstName/>
<lastName>Smith</lastName>
</Person>
|