Class WMPostgresIdentityColumnSupport

  • All Implemented Interfaces:
    org.hibernate.dialect.identity.IdentityColumnSupport

    public class WMPostgresIdentityColumnSupport
    extends org.hibernate.dialect.identity.PostgreSQL81IdentityColumnSupport
    Since:
    19/4/16
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getIdentitySelectString​(java.lang.String table, java.lang.String column, int type)
      PostgresDialect not handling cases where table or columns names in mixed or upper case.
      • Methods inherited from class org.hibernate.dialect.identity.PostgreSQL81IdentityColumnSupport

        getIdentityColumnString, hasDataTypeInIdentityColumn, supportsIdentityColumns
      • Methods inherited from class org.hibernate.dialect.identity.IdentityColumnSupportImpl

        appendIdentitySelectToInsert, buildGetGeneratedKeysDelegate, getIdentityInsertString, supportsInsertSelectIdentity
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.hibernate.dialect.identity.IdentityColumnSupport

        appendIdentitySelectToInsert
    • Constructor Detail

      • WMPostgresIdentityColumnSupport

        public WMPostgresIdentityColumnSupport()
    • Method Detail

      • getIdentitySelectString

        public java.lang.String getIdentitySelectString​(java.lang.String table,
                                                        java.lang.String column,
                                                        int type)
        PostgresDialect not handling cases where table or columns names in mixed or upper case.

        Issues like: whenever any table/column name in non lower case, those are wrapped in double quotes (").

        In these cases invalid IdentitySelectString got generated like: "select currval('schema."Table"_"COLUMN"_seq'), it should be generated as "select currval('schema."Table_COLUMN_seq"')"

        Specified by:
        getIdentitySelectString in interface org.hibernate.dialect.identity.IdentityColumnSupport
        Overrides:
        getIdentitySelectString in class org.hibernate.dialect.identity.PostgreSQL81IdentityColumnSupport
        Parameters:
        table - name of the table, including schema
        column - name of the column
        type - type
        Returns:
        "select currval('schema.table_column_seq')" or "select currval('schema."TABLE_COLUMN_seq"')