Back to Library

Annotations

  • @Index - define an index on a field
  • @Id - primary key
  @Id @GeneratedValue long id; // still set automatically

Composite Primary Key

@Entity @IdClass(ProjectId.class)
public class Project {
    @Id int departmentId;
    @Id long projectId;
 
jpa.txt · Last modified: 2011/08/14 05:20 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd