Skip to content

Instantly share code, notes, and snippets.

@iyengarajay
Last active July 3, 2017 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iyengarajay/81e8bca22a6f97ab6dbb0412d937de56 to your computer and use it in GitHub Desktop.
Save iyengarajay/81e8bca22a6f97ab6dbb0412d937de56 to your computer and use it in GitHub Desktop.
@Entity
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String firstName;
private String lastName;
@Convert(converter=EmailAddressConverter.class)
private EmailAddress email;
@ManyToOne
private SocialMediaSite socialMediaSite;
//Other details.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment