mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
bugfix
This commit is contained in:
@@ -11,6 +11,7 @@ import org.hibernate.tool.schema.spi.Exporter;
|
||||
import org.hibernate.type.SqlTypes;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class MyPostgreSQLDialect extends PostgreSQLDialect {
|
||||
@@ -47,10 +48,14 @@ public class MyPostgreSQLDialect extends PostgreSQLDialect {
|
||||
public String[] getSqlCreateStrings(
|
||||
Table exportable, Metadata metadata, SqlStringGenerationContext context) {
|
||||
|
||||
Optional<PersistentClass> persistentClass1 = metadata.getEntityBindings().stream()
|
||||
.filter(x -> x.getTable() == exportable)
|
||||
.findFirst();
|
||||
if (persistentClass1.isEmpty()){
|
||||
return tableExporter.getSqlCreateStrings(exportable, metadata, context);
|
||||
}
|
||||
PersistentClass persistentClass =
|
||||
metadata.getEntityBindings().stream()
|
||||
.filter(x -> x.getTable() == exportable)
|
||||
.findFirst()
|
||||
persistentClass1
|
||||
.get();
|
||||
|
||||
HyperTable hyperTable =
|
||||
|
||||
Reference in New Issue
Block a user