Skip to content

Commit a16f40f

Browse files
committed
Add a callout list to the Publisher listing in the Quarkus Data tutorial
The "Managed session" section has two listings, Publisher and Book, each with <1> and <2> markers, but only one callout list, under Book. A callout list attaches to the block directly above it, so the Publisher markers had no entries. Give each listing its own list, as the tutorial already does for the two classes in "Creating a Discount Service". Part of #56509
1 parent 382dc35 commit a16f40f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docs/src/main/asciidoc/quarkus-data-hibernate-getting-started.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ public class Publisher extends ManagedEntity { // <1>
421421
}
422422
}
423423
----
424+
<1> `ManagedEntity` replaces `RecordEntity`. This tells Hibernate to track this entity in its persistence context.
425+
<2> The repository uses `ManagedRepository` instead of `RecordRepository`.
424426

425427
[source,java]
426428
----
@@ -442,8 +444,8 @@ public class Book extends ManagedEntity { // <1>
442444
}
443445
}
444446
----
445-
<1> `ManagedEntity` replaces `RecordEntity`. This tells Hibernate to track this entity in its persistence context.
446-
<2> The repository uses `ManagedRepository` instead of `RecordRepository`.
447+
<1> As for `Publisher`, `ManagedEntity` replaces `RecordEntity`.
448+
<2> As for `Publisher`, the repository uses `ManagedRepository` instead of `RecordRepository`.
447449

448450
Since the entities are now managed, `insert()` is no longer available. Use `persist()` instead: unlike `insert()`, it doesn't execute SQL immediately. Hibernate will flush the changes automatically, so you don't need to worry about when SQL is sent to the database. Any changes you make to the entity after calling `persist()` will also be sent to the database at flush time.
449451

0 commit comments

Comments
 (0)