diff --git a/data-rest-composite-id/README.adoc b/data-rest-composite-id/README.adoc index ec9cdf83..a609c203 100644 --- a/data-rest-composite-id/README.adoc +++ b/data-rest-composite-id/README.adoc @@ -21,7 +21,7 @@ This example demonstrates how to implement and expose entities with composite ID == Entity Classes -In this example, we have two entity classes: `Book`[${source-main}/book/Book.java] and `Author`[${source-main}/book/Author.java]. +In this example, we have two entity classes: link:{source-main}/book/Book.java[`Book`] and link:{source-main}/book/Author.java[`Author`]. Both use composite IDs implemented as embedded classes. === Book Entity diff --git a/docs/modules/ROOT/pages/data-rest-composite-id.adoc b/docs/modules/ROOT/pages/data-rest-composite-id.adoc index e1d2b319..768702e6 100644 --- a/docs/modules/ROOT/pages/data-rest-composite-id.adoc +++ b/docs/modules/ROOT/pages/data-rest-composite-id.adoc @@ -2,7 +2,6 @@ :source-highlighter: highlight.js Rashidi Zin 1.0, July 13, 2025 -:toc: :nofooter: :icons: font :url-quickref: https://github.com/rashidi/spring-boot-tutorials/tree/master/data-rest-composite-id @@ -21,7 +20,7 @@ This example demonstrates how to implement and expose entities with composite ID == Entity Classes -In this example, we have two entity classes: `Book`[${source-main}/book/Book.java] and `Author`[${source-main}/book/Author.java]. +In this example, we have two entity classes: link:{source-main}/book/Book.java[`Book`] and link:{source-main}/book/Author.java[`Author`]. Both use composite IDs implemented as embedded classes. === Book Entity @@ -233,13 +232,13 @@ void create() { .post().uri("/books") .content(""" { - "isbn": "9781509827829", + "isbn": "9781402745777", "title": "The Jungle Book", "author": "http://localhost/authors/100" } """) .assertThat().headers() - .extracting(LOCATION).asString().isEqualTo("http://localhost/books/9781509827829"); + .extracting(LOCATION).asString().isEqualTo("http://localhost/books/9781402745777"); } ---- @@ -251,8 +250,8 @@ This test creates a Book with an ISBN, title, and author reference, then verifie ---- @Test @Sql(statements = { - "INSERT INTO author (id, first_name, last_name) VALUES (100, 'Rudyard', 'Kipling')", - "INSERT INTO book (prefix, registration_group, registrant, publication, check_digit, author_id, title) VALUES (978, 1, 509, 82782, 9, 100, 'The Jungle Book')" + "INSERT INTO author (id, first_name, last_name) VALUES (200, 'Rudyard', 'Kipling')", + "INSERT INTO book (prefix, registration_group, registrant, publication, check_digit, author_id, title) VALUES (978, 1, 509, 82782, 9, 200, 'The Jungle Book')" }) @DisplayName("Given a book is available When I request by its ISBN Then its information should be returned") void get() {