@Table
@Column
@Enumerated
@Lob
@Temporal
@Embedable
@Enumerated
@Lob
binary large object (BLOB): char[]
character large object (CLOB): String
@Temporal(TemporalType.DATE)
protected Date creationDate;
Generating primary keys(natural keys /surrogate keys)
1. Identity columns as generators
2. Database sequences as generators
3. Sequence tables as generators
4. Default primary key generation strategy
One-to-one unidirectional relationship using @JoinColumn
One-to-one relationship using @PrimaryKeyJoinColumn
One-to-many and many-to-one
Many-to-many
Mapping Inheritance
1. Single Table
2. Joined Tables
3. Table per Class (the worst)
Single Table
Joined Table
Table per Class
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment