Skip to content

Instantly share code, notes, and snippets.

@JoshStark
Created January 25, 2016 19:01
Show Gist options
  • Save JoshStark/b6ba5117337f8a1157d4 to your computer and use it in GitHub Desktop.
Save JoshStark/b6ba5117337f8a1157d4 to your computer and use it in GitHub Desktop.
Example of JPA entity
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