Add support for SERIAL columns in SapDB (MaxDB) dialect
-------------------------------------------------------
Key: HHH-7324
URL:
https://hibernate.onjira.com/browse/HHH-7324
Project: Hibernate ORM
Issue Type: Improvement
Components: core
Affects Versions: 3.6.10
Reporter: Adam Dyga
Priority: Minor
Currently org.hibernate.dialect.SAPDBDialect doesn't support SERIAL columns. The code
below shows how how to do it by subclassing SAPDBDialect but it could be included in
SAPDBDialect directly...
{code}
/**
* Extends SAPDBDialect to support identity (serial) columns in MaxDB.
*
* @author Adam Dyga
*
*/
public class MaxDBDialect extends SAPDBDialect {
/**
*
*/
public MaxDBDialect() {
}
@Override
public String getIdentitySelectString(String table, String column, int type) throws
MappingException {
return "select " + table + ".currval from dual";
}
@Override
public boolean supportsIdentityColumns() {
return true;
}
@Override
public boolean hasDataTypeInIdentityColumn() {
return true;
}
@Override
public String getIdentityColumnString(int type) throws MappingException {
return "serial";
}
}
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira