Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ public void run(String... args) throws Exception {

savedNabil.getBooks().add(savedBookSpring6); // Add the first book to the first author
savedTawfiq.getBooks().add(savedBookJava); // Add the second book to the second author
savedBookSpring6.getAuthors().add(savedNabil); // Add the first author to the first book
savedBookJava.getAuthors().add(savedTawfiq); // Add the second author to the second book

savedBookSpring6.setPublisher(javaPublisher); // Set the publisher for the first book
savedBookJava.setPublisher(savedSpringPublisher); // Set the publisher for the second book
savedBookSpring6.setPublisher(savedSpringPublisher); // Set the publisher for the first book
savedBookJava.setPublisher(savedJavaPublisher); // Set the publisher for the second book

iAuthorRepositroy.save(savedNabil); // Save the updated first author
iAuthorRepositroy.save(savedTawfiq); // Save the updated second author
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
server.port=9090
//spring.jpa.open-in-view=false
//spring.jpa.open-in-view=false
spring.h2.console.enabled=true
spring.datasource.url=jdbc:h2:mem:testdb