Created
January 25, 2016 19:01
-
-
Save JoshStark/b6ba5117337f8a1157d4 to your computer and use it in GitHub Desktop.
Example of JPA entity
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
package example; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.Id; | |
@Entity(name = "employee") | |
public class Employee { | |
@Id | |
@GeneratedValue | |
public Long id; | |
@Column(name = "emp_salary") | |
public int salary; | |
@Column(name = "emp_first_name") | |
public String firstName; | |
@Column(name = "emp_last_name") | |
public String lastName; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment