Hibernate version: 3.2.0
Hello,
I've run into some strange problems with sequences. I am using Hibernate Annotations 3.2.0 with an Oracle 9i database. My class looks like this:
Code:
@Entity
@Table(name="PLANNING_ENTRY", schema="EDACPLANNING")
@SequenceGenerator(name="IDGEN",sequenceName="EDACPLANNING.SEQ_PLANNING_ENTRY")
public class PlanningEntry extends EdacObject
{
...
@Id
@Column(name="PE_ID")
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="IDGEN")
public int getId()
{
return this.id;
}
This works quite fine except that when saving such an object not the next number of the sequence, but approx. the next number multiplied with 50 is used. Is this a bug or a feature? I did not find anything about this neither in the docs nor in the forum.
Does anyone know this behvior? How can this problem be solved so that the numbers of the sequence will be used?
Regards,
Ralf.