Created
January 22, 2016 03:53
-
-
Save cosbor11/67146e9ef69b860b5fb7 to your computer and use it in GitHub Desktop.
Entity Definition of an Actor
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 | |
| public class Actor | |
| { | |
| @Attribute | |
| @Identifier(generator = IdentifierGenerator.SEQUENCE) | |
| protected long actorId; | |
| @Attribute | |
| protected String actorFirstName; | |
| @Attribute | |
| protected String actorLastName; | |
| @Relationship(type = RelationshipType.MANY_TO_MANY, | |
| inverseClass = Movie.class, | |
| inverse = "actors", | |
| cascadePolicy = CascadePolicy.NONE, | |
| fetchPolicy = FetchPolicy.LAZY) | |
| protected List<Movie> movies; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment