Hi,
I finally got my entity beans working the way I want. But I found that to get the sequence working, I had to use the following annotations (look at the GeneratedValue annotation):
@Entity @Table(name = "t_investigators", schema = "dryice" ) @SequenceGenerator(name = "InvestigatorBeanSequence", sequenceName = "s_investigators") public class InvestigatorBean implements Investigator, Serializable { @Id @GeneratedValue(generator = "InvestigatorBeanSequence") @Column(name = "id") private long tableId;
@Entity @Table(name = "t_investigators", schema = "dryice" ) @SequenceGenerator(name = "InvestigatorBeanSequence", sequenceName = "s_investigators") public class InvestigatorBean implements Investigator, Serializable { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "InvestigatorBeanSequence") @Column(name = "id") private long tableId;
Don't have any direct experience with this, but remember coming across this JIRA issue one:
http://jira.jboss.com/jira/browse/EJBTHREE-597?page=comments#action_12341363
Maybe the workarounds in there might help?
S,
ALR