-->
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: Oracle12c Identity feature implementation with Hibernate5.0
PostPosted: Wed Nov 25, 2015 11:08 am 
Newbie

Joined: Wed Nov 25, 2015 10:20 am
Posts: 1
Hi All,

I am trying to save an entity by using Identity generator with oracle12c database. is it supported by hibernate.if so what is the version.any explanation would be greatly appreciated.

Thanks in Advance,Lakshmi.


Top
 Profile  
 
 Post subject: Re: Oracle12c Identity feature implementation with Hibernate5.0
PostPosted: Wed Nov 25, 2015 11:35 am 
Regular
Regular

Joined: Mon Oct 19, 2015 7:49 am
Posts: 61
Location: ChengDu China
Yes, configurations, it's is supported by newest hibernate

This is the source code of "org.hibernate.dialect.Oracle12cDialect" in Hibernate5.0.4.Final,
the method "supportsIdentityColumns" has been overriden.

Code:
package org.hibernate.dialect;

import org.hibernate.cfg.Environment;
import org.hibernate.dialect.pagination.LimitHandler;
import org.hibernate.dialect.pagination.SQL2008StandardLimitHandler;

/**
* An SQL dialect for Oracle 12c.
*
* @author zhouyanming (zhouyanming@gmail.com)
*/
public class Oracle12cDialect extends Oracle10gDialect {
   public Oracle12cDialect() {
      super();
      getDefaultProperties().setProperty( Environment.BATCH_VERSIONED_DATA, "true" );
   }

   @Override
   protected void registerDefaultProperties() {
      super.registerDefaultProperties();
      getDefaultProperties().setProperty( Environment.USE_GET_GENERATED_KEYS, "true" );
   }

   @Override
   public boolean supportsIdentityColumns() {
      return true;
   }

   @Override
   public boolean supportsInsertSelectIdentity() {
      return true;
   }

   @Override
   public String getIdentityColumnString() {
      return "generated as identity";
   }

   @Override
   public LimitHandler getLimitHandler() {
      return SQL2008StandardLimitHandler.INSTANCE;
   }

}


Top
 Profile  
 
 Post subject: Re: Oracle12c Identity feature implementation with Hibernate5.0
PostPosted: Wed Nov 25, 2015 11:49 am 
Regular
Regular

Joined: Mon Oct 19, 2015 7:49 am
Posts: 61
Location: ChengDu China
Thanks for your question very much, I found a new task for my framework by view your question, for the "distinct limit paging query" functionality, I need to add a new class "org.babyfish.hibernate.dialect.Oracle12cDialect":)


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.