Created
August 20, 2019 10:02
-
-
Save hakaneroztekin/800c9716355cd8a631462742bf5b4bb9 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
@Entity // the class will be stored in the DB | |
class HighSchool { | |
@Id // Id annotation | |
@GeneratedValue(strategy = GenerationType.IDENTITY) // Auto generated value | |
@Column(name = "id") // We can specify the column name (optional) | |
private Long id; | |
@Column(name = "name") | |
private Long name; | |
@OneToMany | |
@Column(name = "student") | |
private Student student; | |
// setters and getters and other methods | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment