-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Sequence returning huge number
PostPosted: Tue Feb 05, 2008 9:23 pm 
Newbie

Joined: Wed Aug 01, 2007 6:08 pm
Posts: 13
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.