-->
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.  [ 1 post ] 
Author Message
 Post subject: DB2400Dialect GenerationType.SEQUENCE
PostPosted: Thu Apr 26, 2007 5:16 pm 
Newbie

Joined: Wed Apr 25, 2007 5:14 pm
Posts: 5
GenerationType.SEQUENCE can be used with DB2400Dialect if two methods were added as follows. I created my own dialect class so that I could get my application working.

Code:
package com.liebert.hibernate;

public class DB2400Dialect extends org.hibernate.dialect.DB2400Dialect
{
    public boolean supportsSequences() {
        return true;
    }
   
    public String getSequenceNextValString(String sequenceName) {
        return "select nextval for " + sequenceName + " from sysdummy1";
    }
}


If org.hibernate.dialect.DB2400Dialect is updated I would use it. I would also make the change but I don't have the time now and I'm not familiar with how to contribute.

"sysdummy1" needs to be "sysibm.sysdummy1" if naming=sql property is used. See http://forum.hibernate.org/viewtopic.php?t=973837


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

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.