File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
hibernate-core/src/main/java/org/hibernate/graph Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 77import java .util .List ;
88
99import jakarta .persistence .metamodel .Attribute ;
10- import jakarta .persistence .metamodel .EntityType ;
1110import jakarta .persistence .metamodel .ManagedType ;
1211import jakarta .persistence .metamodel .MapAttribute ;
1312import jakarta .persistence .metamodel .PluralAttribute ;
4241 * </ul>
4342 * <p>
4443 * When a graph is defined programmatically, the new graph is usually instantiated by calling
45- * {@link jakarta.persistence.EntityManager#createEntityGraph(Class)}. However, this requires
46- * a reference to and {@code EntityManager}, which might not always be convenient. An
47- * alternative is provided by {@link EntityGraphs#createGraph(EntityType)}.
44+ * {@link jakarta.persistence.EntityManager#createEntityGraph(Class)}. However, this requires a
45+ * reference to and {@code EntityManager}, which might not always be convenient. An alternative
46+ * is provided by {@link EntityGraphs#createGraph(jakarta.persistence.metamodel.EntityType)},
47+ * where the {@code EntityType} may be obtained from the static metamodel:
48+ * <pre>
49+ * EntityGraph<Book> graph = EntityGraphs.createGraph(Book_.class_);
50+ * </pre>
4851 *
4952 * @apiNote Historically, both {@link jakarta.persistence.EntityGraph} and this interface
5053 * declared operations with incorrect generic types, leading to unsound code. This was
You can’t perform that action at this time.
0 commit comments