hi,
i hava a problem
i have a db oracle, and i have implemented jpa annotation and a composite key
my class :
class item which contains
Code:
@EmbeddedId
protected PrimaryKeyId primaryKeyId;
class PrimaryKeyId
Code:
@Embeddable
public class PrimaryKeyId implements Serializable {
/**
*
*/
private static final long serialVersionUID = 2868479904735001761L;
@Column(length=2,name="key1")
private String nkeyId1="01";
@Column(name="key2")
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="sequenceItem")
@SequenceGenerator( name = "sequenceItem",sequenceName="SEQ_ITEM",allocationSize=1)
private int nkeyId2;
with getter/setters...
in my db, oraclesqldevelopper say that the sequence has never been used...
it seems that the generated value is not call, in my db i have only one row with key "010", 0 for the nkeyId2 not incremented
if i save many item, there are all updated because the ids is not incremented...
do i need to implement something else?
thx