File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
hibernate-core/src/main/java/org/hibernate/dialect Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 6
6
*/
7
7
package org .hibernate .dialect ;
8
8
9
+ import org .hibernate .hql .spi .id .IdTableSupportStandardImpl ;
10
+ import org .hibernate .hql .spi .id .MultiTableBulkIdStrategy ;
11
+ import org .hibernate .hql .spi .id .local .AfterUseAction ;
12
+ import org .hibernate .hql .spi .id .local .LocalTemporaryTableBulkIdStrategy ;
13
+
9
14
/**
10
15
* An SQL dialect for Postgres 9 and later. Adds support for "if exists" when dropping constraints
11
16
*
@@ -16,4 +21,23 @@ public class PostgreSQL9Dialect extends PostgreSQL82Dialect {
16
21
public boolean supportsIfExistsBeforeConstraintName () {
17
22
return true ;
18
23
}
24
+
25
+ @ Override
26
+ public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy () {
27
+ return new LocalTemporaryTableBulkIdStrategy (
28
+ new IdTableSupportStandardImpl () {
29
+ @ Override
30
+ public String getCreateIdTableCommand () {
31
+ return "create temporary table" ;
32
+ }
33
+
34
+ @ Override
35
+ public String getDropIdTableCommand () {
36
+ return "drop table" ;
37
+ }
38
+ },
39
+ AfterUseAction .DROP ,
40
+ null
41
+ );
42
+ }
19
43
}
You can’t perform that action at this time.
0 commit comments