Skip to content
Ameen Abozaid
Planned lessonJNR-028-L07

Demo: mapping Shop entities and predicting the SQL

  • Lesson 7 of 8
  • Junior
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

map Product, Category, and Money, and predict each statement; prepares JNR-028-LAB1.

Draft outline details

Step by step

  1. Add spring-boot-starter-data-jpa and enable SQL logging (spring.jpa.show-sql or the org.hibernate.SQL logger); set ddl-auto=none.
  2. Map Category and Product with Money embedded; match columns to the manual schema.sql.
  3. Write a create-update-read sequence in a transactional test.
  4. Before running, write on screen the SQL you expect for each line.
  5. Planned mistake: map an enum without EnumType.STRING; show the number stored, fix it.
  6. Run and compare the log with the predictions.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.