Skip to content

Instantly share code, notes, and snippets.

@cosbor11
Last active October 23, 2015 04:34
Show Gist options
  • Select an option

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

Select an option

Save cosbor11/f0715798d764b10f76a1 to your computer and use it in GitHub Desktop.
@Entity
public class Sailboat
{
@Identifier
@Attribute
protected String registrationCode;
@Attribute
protected String name;
@Relationship(type = RelationshipType.ONE_TO_MANY,
inverseClass = CrewMember.class,
inverse = "sailboat",
cascadePolicy = CascadePolicy.ALL,
fetchPolicy = FetchPolicy.LAZY)
protected List<CrewMember> crew;
// getters and setters
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment