Hi, i am using hibernate 3.2.1
I have an entity wich gets its ID from specific sequence:
@SequenceGenerator(name = "My_SEQ", sequenceName = "seq_sam")
@Entity
public class MyClass
{
int id;
String name;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "My_SEQ")
public int getId()
{
}
public void setId(int id)
{
this.id = id;
}
...
}
when i persist a new entity, i can see the nextval call to this sequence, but the id value is not the nextvalue of the sequence. For example if the lastvalue of the sequence is 60600,the id value for my entity is 3234556, the difference between both values is enormous..
I am using jboss 4.2.0.GA, in jboss 4.0.3SP1 this works fine.
thanks
|