Skip to content

Instantly share code, notes, and snippets.

@cosbor11
Created January 22, 2016 03:53
Show Gist options
  • Select an option

  • Save cosbor11/67146e9ef69b860b5fb7 to your computer and use it in GitHub Desktop.

Select an option

Save cosbor11/67146e9ef69b860b5fb7 to your computer and use it in GitHub Desktop.
Entity Definition of an Actor
@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