Last active
July 9, 2018 23:30
-
-
Save ryanzhou7/c3fbb40f68b1f8d7394767a83d335031 to your computer and use it in GitHub Desktop.
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 hello; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.GenerationType; | |
import javax.persistence.Id; | |
@Entity // This tells Hibernate to make a table out of this class | |
public class User { | |
@Id | |
@GeneratedValue(strategy=GenerationType.AUTO) | |
private Integer id; | |
private String name; | |
private String email; | |
public Integer getId() { | |
return id; | |
} | |
public void setId(Integer id) { | |
this.id = id; | |
} | |
//Getter/Setters for rest of fields, etc... | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment