This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes sequence as String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "sequence as String" Watch "sequence as String" New topic
Author

sequence as String

Abhinav Srivastava
Ranch Hand

Joined: Nov 19, 2002
Posts: 349

I am getting a ClassCastException when using a SequenceGenerator on a field of type String (with hibernate) (String cannot be cast to a number). Is this how it is supposed to be? With OpenJPA it worked fine.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Which JPA implementation are you using? Database?

-Cameron McKenzie
Abhinav Srivastava
Ranch Hand

Joined: Nov 19, 2002
Posts: 349

Hibernate with Oracle 9i
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sequence as String