Hi, I am trying to autogenerate an id inside an Embeddable entity but is not working, just ignores the TableGenerator and the GeneratedValue.
Code:
@Embeddable
public class StatPk implements Serializable{
   @GeneratedValue(strategy=GenerationType.TABLE, generator="stats_seq")
   @TableGenerator(name="stats_seq", table="sequence_table", pkColumnName="seq_name", valueColumnName="seq_count", pkColumnValue="stats_seq", allocationSize=1000)
   @Column(name="stat_sequence")
   private Long statSequence;
   
   private RecordPk recordId;
************************
More code here
************************
Parent class here
@Entity
@Table(name="mail_stats")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Stat implements Serializable{
   @EmbeddedId
   private StatPk id;
**************
more code here
**************
But the funny thing is that if I take those 2 properties and I set them in Other class with annotation @Id (stop using @EmbeddedId) it works just fine. 
Any advice?
I am using Hibernate 3.5.4-Final and hibernate-jpa-2.0-api 1.0.0.Final.