Skip to content

Instantly share code, notes, and snippets.

@juanfezero
Last active October 26, 2015 20:15
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 juanfezero/e727de4a929013432a2f to your computer and use it in GitHub Desktop.
Save juanfezero/e727de4a929013432a2f to your computer and use it in GitHub Desktop.
database column char to boolean hibernate - juanfezero -
//if ADMIN database column contains 'yes' then admin = true
//otherwise admin = false
@Column(name = "ADMIN", columnDefinition = "char(3)")
@Type(type = "yes_no")
@NotEmpty
private boolean admin;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment