Hi, perhaps these codes can help you
Code:
@Entity
@GenericGenerator(name = "IdSirketKey", strategy = "com.bordronet.util.generator.IdSirketGenerator")
@Table(name="sirket")
public class Sirket implements Serializable{
/**
*
*/
private static final long serialVersionUID = 7519392404377131237L;
@EmbeddedId
@GeneratedValue(generator = "IdSirketKey")
private SirketPk primaryKeys;
private String unvan ;
private String adres ;
......
}
and SirketPK.java
Code:
@Embeddable
public class SirketPk implements Serializable{
/**
*
*/
private static final long serialVersionUID = -7371077337159811295L;
private int id ;
private Calendar basTarih ;
private Calendar sonTarih ;
.....
}