It's not a secret anymore!*
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
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