Skip to content

Commit afee0d7

Browse files
committed
HHH-3404 remove unused imports
1 parent 66cede3 commit afee0d7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

documentation/src/main/asciidoc/introduction/Mapping.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ is a bad idea, since it's impossible to create a foreign key constraint that tar
168168
// Hibernate doesn't support mixing ``InheritanceType``s within a single entity hierarchy.
169169
// However, it's possible to emulate a mix of `SINGLE_TABLE` and `JOINED` inheritance using the `@SecondaryTable` annotation.
170170

171+
[CAUTION]
172+
====
173+
It's quite easy to overuse inheritance.
174+
We've occasionally seen extreme cases where a `JOINED` inheritance hierarchy includes _hundreds_ of entities, spanning hundreds of tables.
175+
Efficiently querying such a hierarchy is an almost impossible task for Hibernate.
176+
Fortunately, a `JOINED` inheritance relationship can always be remodeled as a one-to-one association, allowing much more efficient queries.
177+
In general, a single entity inheritance hierarchy should never span more than a few tables, including secondary tables.
178+
====
179+
171180
[[table-mappings]]
172181
=== Mapping to tables
173182

hibernate-core/src/main/java/org/hibernate/dialect/MariaDBDialect.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,11 @@
5858

5959
import static org.hibernate.exception.spi.TemplatedViolatedConstraintNameExtractor.extractUsingTemplate;
6060
import static org.hibernate.internal.util.JdbcExceptionHelper.extractSqlState;
61-
import static org.hibernate.query.sqm.produce.function.FunctionParameterType.NUMERIC;
62-
import static org.hibernate.query.sqm.produce.function.FunctionParameterType.STRING;
6361
import static org.hibernate.type.SqlTypes.GEOMETRY;
6462
import static org.hibernate.type.SqlTypes.OTHER;
6563
import static org.hibernate.type.SqlTypes.UUID;
6664
import static org.hibernate.type.SqlTypes.VARBINARY;
6765
import static org.hibernate.type.StandardBasicTypes.BOOLEAN;
68-
import static org.hibernate.type.StandardBasicTypes.DOUBLE;
6966

7067
/**
7168
* A {@linkplain Dialect SQL dialect} for MariaDB 10.6 and above.

0 commit comments

Comments
 (0)