-->
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.  [ 2 posts ] 
Author Message
 Post subject: net.sf.hibernate.id.IdentifierGenerationException: ids for t
PostPosted: Mon Aug 22, 2005 5:26 pm 
Newbie

Joined: Fri Aug 05, 2005 3:42 pm
Posts: 12
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

2.1:

Code between sessionFactory.openSession() and session.close():


net.sf.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.transfer.object.ArtefatoTO:


MySQL 4.1


Top
 Profile  
 
 Post subject: generator type
PostPosted: Mon Aug 22, 2005 5:41 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
I guess that you have used generator type assigned and did not assign ID walue before saving your object. If you want Hibernate to create ID automatically then you need to specify different ID generator and set unsaved-value='null'

http://www.hibernate.org/hib_docs/v3/re ... aration-id

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.