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 7
7
import java .util .List ;
8
8
9
9
import jakarta .persistence .metamodel .Attribute ;
10
- import jakarta .persistence .metamodel .EntityType ;
11
10
import jakarta .persistence .metamodel .ManagedType ;
12
11
import jakarta .persistence .metamodel .MapAttribute ;
13
12
import jakarta .persistence .metamodel .PluralAttribute ;
42
41
* </ul>
43
42
* <p>
44
43
* 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>
48
51
*
49
52
* @apiNote Historically, both {@link jakarta.persistence.EntityGraph} and this interface
50
53
* declared operations with incorrect generic types, leading to unsound code. This was
You can’t perform that action at this time.
0 commit comments