HHH-10150 - Override PostgreSQL9Dialect#getDefaultMultiTableBulkIdStrategy() causing exception in deleting joined subclasses
This commit is contained in:
parent
a58a866e67
commit
e59999e57b
|
@ -6,6 +6,11 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.dialect;
|
package org.hibernate.dialect;
|
||||||
|
|
||||||
|
import org.hibernate.hql.spi.id.IdTableSupportStandardImpl;
|
||||||
|
import org.hibernate.hql.spi.id.MultiTableBulkIdStrategy;
|
||||||
|
import org.hibernate.hql.spi.id.local.AfterUseAction;
|
||||||
|
import org.hibernate.hql.spi.id.local.LocalTemporaryTableBulkIdStrategy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An SQL dialect for Postgres 9 and later. Adds support for "if exists" when dropping constraints
|
* An SQL dialect for Postgres 9 and later. Adds support for "if exists" when dropping constraints
|
||||||
*
|
*
|
||||||
|
@ -16,4 +21,23 @@ public class PostgreSQL9Dialect extends PostgreSQL82Dialect {
|
||||||
public boolean supportsIfExistsBeforeConstraintName() {
|
public boolean supportsIfExistsBeforeConstraintName() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy() {
|
||||||
|
return new LocalTemporaryTableBulkIdStrategy(
|
||||||
|
new IdTableSupportStandardImpl() {
|
||||||
|
@Override
|
||||||
|
public String getCreateIdTableCommand() {
|
||||||
|
return "create temporary table";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDropIdTableCommand() {
|
||||||
|
return "drop table";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
AfterUseAction.DROP,
|
||||||
|
null
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue