Last active
October 26, 2015 20:15
-
-
Save juanfezero/e727de4a929013432a2f to your computer and use it in GitHub Desktop.
database column char to boolean hibernate - juanfezero -
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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