Skip to content

Instantly share code, notes, and snippets.

@cosbor11
Created July 5, 2016 13:35
Show Gist options
  • Save cosbor11/f07e6a9756c036e40e95db42049805c7 to your computer and use it in GitHub Desktop.
Save cosbor11/f07e6a9756c036e40e95db42049805c7 to your computer and use it in GitHub Desktop.
Invoice entity before the model updates
@Entity
public class Invoice extends ManagedEntity implements IManagedEntity
{
@Attribute
@Identifier
protected Long invoiceId;
@Attribute
protected Date invoiceDate;
@Attribute
protected Date dueDate;
@Attribute
protected double amount;
@Attribute
protected String notes;
@Relationship(type = RelationshipType.ONE_TO_ONE,
inverse = "invoice",
inverseClass = Payment.class,
cascadePolicy = CascadePolicy.SAVE,
fetchPolicy = FetchPolicy.EAGER)
protected Payment payments;
@Relationship(type = RelationshipType.MANY_TO_ONE,
inverseClass = Account.class,
inverse = "invoices")
protected Account account;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment