I have 2 entities:
   @Entity
   @XmlRootElement
   public class test {
       @Getter
       @Setter
       @XmlElement(HERE I WANT THE NAME OF THE COUNTRY)
       private Country country
   }
   @Entity
   public class Country {
      @Getter
      @Setter
      private String name;
      @Getter
      @Setter
      private String capital;  
   }
Is there some magic I can use to get the name of the country for the @XmlElement as a simple String without wrap the country entity with @Xml-annotations?