@Entity @Table(name="Detail") private static class Detail { @Id @GeneratedValue private Integer id; @Column(nullable = false) private String detailType; private String description; } }
@Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "realId") public Long getRealId() { return realId; }
@Entity( name = "Message" ) public static class Message { @Id private Integer id; private String name; @ManyToOne @JoinColumn private Poster poster; }
@Entity(name = "TheEntity") @Table(name = "TheEntity") public static class TheEntity { @Id @Column( length = 16 ) @GeneratedValue public UUID id; } }
@Id @GeneratedValue @Column(name="iId") public Integer getId() { return id; }
/** * @author Emmanuel Bernard */ @Entity public class Trousers { @Id public Integer id; @OneToOne @JoinColumn(name = "zip_id") public TrousersZip zip; }
@Entity( name = "thing" ) @Table( name = "THING_ENTITY" ) public class Thing { @Id @GeneratedValue( strategy = GenerationType.AUTO ) long id; @Version long version; @Column( updatable = false ) String special; } }
@Id @GeneratedValue @Column(name = "id", unique = true, nullable = false) public Long getId() { return id; }
@Entity( name = "Message" ) public static class Message { @Id private Integer mid; private String msgTxt; @ManyToOne( cascade = CascadeType.MERGE ) @JoinColumn private Poster poster; }
@Entity(name = "Entity1") @Table(name = "Entity_1") public static class Entity1 { @Id @GeneratedValue private int id; }
@Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "realId") public Long getRealId() { return realId; }
@Entity( name = "Message" ) public static class Message { @Id private Integer mid; private String msgTxt; @ManyToOne @JoinColumn private Poster poster; }
@Entity @Table( name = "SIMPLE_ENTITY" ) private static class SimpleEntity { @Id @GeneratedValue Long id; String name; } }
@Id @GeneratedValue @Column( name = "GROUPID" ) public long getGroupId() { return groupId; }
@Entity( name = "Message" ) public static class Message { @Id private Integer mid; private String msgTxt; @ManyToOne @JoinColumn private Poster poster; }
@Entity( name = "Entity1" ) @Table( name = "Entity1" ) public static class Entity1 { @Id @GeneratedValue( strategy = GenerationType.SEQUENCE ) public Integer id; }
@Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "realId") public Long getRealId() { return realId; }