Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save cosbor11/8e56ad32eb369fc20fef to your computer and use it in GitHub Desktop.
@Entity
public class CrewMember
{
@Identifier(generator = IdentifierGenerator.SEQUENCE)
@Attribute
public long id;
@Attribute
public String firstName;
@Attribute
public String lastName;
@Relationship(type = RelationshipType.MANY_TO_ONE,
inverseClass = Sailboat.class,
inverse = "crew",
cascadePolicy = CascadePolicy.NONE)
public Sailboat sailboat;
// getters and setters
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment