Skip to content

Instantly share code, notes, and snippets.

@sebersole
Created August 30, 2013 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sebersole/6391452 to your computer and use it in GitHub Desktop.
Save sebersole/6391452 to your computer and use it in GitHub Desktop.
@Embeddable
class Address {
...
@Convert(...) private String city;
}
@Entity
@Convert(attributeName="homeAddress.city", disableConversion=true)
class Person {
...
private Address homeAddress;
}
<entity class="Person">
<attributes>
<embedded name="homeAddress">
<convert attributeName="city" .../>
</embedded>
</attributes>
</entity>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment