-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to use generator sequence with User Types
PostPosted: Tue Oct 14, 2003 4:09 pm 
Newbie

Joined: Tue Oct 14, 2003 3:47 pm
Posts: 1
Location: Brasil - Rio de Janeiro
When I use an id that is a User Type with generator sequence I receive an exception on inserting an object.

net.sf.hibernate.id.IdentifierGenerationException: this id generator generates long, integer, short
at net.sf.hibernate.id.IdentifierGeneratorFactory.get(IdentifierGeneratorFactory.java:33)
at net.sf.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:65)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:614)

I'm using Hibernate 2.0. Is it a bug or an unimplemented feature?

Domingos Fernando


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 14, 2003 7:48 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
you must use a custom IdentifierGenerator, of course.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 12, 2003 9:56 pm 
Regular
Regular

Joined: Wed Sep 10, 2003 2:26 pm
Posts: 56
Location: San Diego, CA
I"ve run into the same problem.

All my UserType does is take a numberic id and convert it into a numeric string. I could be mistaken, but in theory, there is nothing in this scenario that precludes using the native generator. Am I right? Why can't this be doable if the UserType returns an iteger sql type from sqlTypes()?

Dmitry


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

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.