@@ -285,7 +285,8 @@ the subtype Class.
285285Hibernate allows the creation of Jakarta Persistence fetch/load graphs by parsing a textual representation
286286of the graph. Generally speaking, the textual representation of a graph is a comma-separated
287287list of attribute names, optionally including any subgraph specifications.
288- `org.hibernate.graph.GraphParser` is the starting point for such parsing operations.
288+ The starting point for such parsing operations is either `org.hibernate.graph.GraphParser`
289+ or `SessionFactory#parseEntityGraph`
289290
290291[NOTE]
291292====
@@ -370,6 +371,28 @@ include::{example-dir-fetching}/GraphParsingTest.java[tags=fetching-strategies-d
370371====
371372
372373
374+ [[fetching-strategies-dynamic-fetching-entity-graph-parsing-annotation]]
375+ ==== @NamedEntityGraph with text representation
376+
377+ Hibernate also offers a `@org.hibernate.annotations.NamedEntityGraph` annotation, as a corollary
378+ to the `@jakarta.persistence.NamedEntityGraph`, supporting the text representation
379+ <<fetching-strategies-dynamic-fetching-entity-graph-parsing,discussed previously>>. The annotation
380+ may be placed on an entity or on a package.
381+
382+
383+ .@NamedEntityGraph example
384+ ====
385+ [source, java, indent=0]
386+ ----
387+ @Entity
388+ @NamedEntityGraph( graph="title,isbn,author(name,phoneNumber)" )
389+ class Book {
390+ // ...
391+ }
392+ ----
393+ ====
394+
395+
373396[[fetching-strategies-dynamic-fetching-profile]]
374397=== Dynamic fetching via Hibernate profiles
375398
0 commit comments