Skip to content

Commit 55455c6

Browse files
committed
add an example to javadoc of GraphParser
1 parent 6056ec9 commit 55455c6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hibernate-core/src/main/java/org/hibernate/graph/GraphParser.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@
1717
/**
1818
* Parser for string representations of JPA {@link jakarta.persistence.EntityGraph}
1919
* ({@link RootGraph}) and {@link jakarta.persistence.Subgraph} ({@link SubGraph}),
20-
* using a simple syntax defined by the {@code graph.g} ANTLR grammar.
20+
* using a simple syntax defined by the {@code graph.g} ANTLR grammar. For example:
21+
* <pre>employees(username, password, accessLevel, department(employees(username)))</pre>
2122
* <p>
2223
* The {@link #parse} methods all create a root {@link jakarta.persistence.EntityGraph}
2324
* based on the passed entity class and parse the graph string into that root graph.
2425
* <p>
2526
* The {@link #parseInto} methods parse the graph string into a passed graph, which may be a subgraph
2627
* <p>
27-
* Multiple graphs made for the same entity type can be merged.
28-
* See {@link EntityGraphs#merge(EntityManager, Class, jakarta.persistence.Graph...)}.
28+
* Multiple graphs for the same entity type can be
29+
* {@linkplain EntityGraphs#merge(EntityManager, Class, jakarta.persistence.Graph...)
30+
* merged}.
2931
*
3032
* @author asusnjar
3133
*/

0 commit comments

Comments
 (0)