I am using Oracle 10, Hibernate 3.0 with JPA and Spring. I am using annotations for hibernate mapping and mapped Id as:
@Id @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="OTB_DATA_POINTS_SEQUENCE")
@SequenceGenerator(name="OTB_DATA_POINTS_SEQUENCE", sequenceName = "BOOKER.OTB_DATA_POINTS_SEQUENCE")
@Column(name = "ID")
public Long getId() {
return this.id;
}
When I get next value from the sequence manually using SQL it returns a number in billions (which is correct), but when I return the id using Hibernate I find it returns a number in trillions. Why I am finding this inconsistent number with Hibernate.
|