Last active
August 21, 2017 19:36
-
-
Save sebersole/b886adbcc2d66a77e13ea45d81c51628 to your computer and use it in GitHub Desktop.
This file contains hidden or 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(...) | |
class EpisodePerson { | |
@EmbeddedId | |
Id id; | |
@Enumerated | |
EpisodeRole episodeRole; | |
Episode getEpisode() { | |
return getId().getEpisode(); | |
} | |
@Embeddable | |
class Id { | |
@ManyToOne | |
Episode episode; | |
@ManyToOne | |
Person person; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment