-->
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.  [ 4 posts ] 
Author Message
 Post subject: JPA + Hibernate
PostPosted: Fri Apr 20, 2007 4:11 pm 
Newbie

Joined: Fri Apr 20, 2007 3:55 pm
Posts: 2
I'm using the MSSQL 2000 dialect and i'm having the follow error message:

javax.persistence.PersistenceException: org.hibernate.MappingException: could not instantiate id generator

org.hibernate.MappingException: Dialect does not support sequences


I don't know what is it! Can someone help me?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 20, 2007 4:21 pm 
Newbie

Joined: Fri Apr 20, 2007 3:46 pm
Posts: 15
Hi,

I believe you using sequences to generate the id and the dialect ( MSSQL 2000) does not have sequences. I believe they have identity.

<id name="id" type="integer" column="ID">
<generator class="identity"/>
</id>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 24, 2007 2:38 pm 
Newbie

Joined: Fri Apr 20, 2007 3:55 pm
Posts: 2
Hello,

I am using EJB3, look at what i am doing:


Code:
  @Id
   @GeneratedValue(strategy = GenerationType.IDENTITY)
   public int getR_E_C_N_O_() {
      return R_E_C_N_O_;
   }


I am thinking something wrong...

24/04/2007 15:22:56 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): disabled


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 11, 2008 8:33 am 
Newbie

Joined: Mon Feb 11, 2008 8:30 am
Posts: 1
Thanks, Bumbalo, that was what I needed!


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