Here's my problem:
Say I have two entities annotated with JAX-RS annotations:
@XmlRootElement
@Entity
public Person {
private String firstname;
private String lastname;
private Address address;
}
@XmlType
@Entity
public Address {
private String street;
private String city;
}
This will get rendered into:
<person>
<firstname></firstname>
<lastname></lastname>
<address>
<street></street>
<city></city>
</address>
</person>
My question therefore is:
Is it possible to annotate those entities so that the xml returned is:
<person>
<firstname></firstname>
<lastname></lastname>
<street></street>
<city></city>
</person>
i.e. properties of Address entity are treated as Person properties (without the enclosing tags)?