Grokking Spring Boot
Vote

0% completed

​

Relationships Between Entities

One call to em.persist with a new event at Riverside Hall, followed by the commit, produced these statements.

StatementCount
insert into event ...1
insert into seat ...600
select next value for seat_seq12

The code persisted only the event. The 600 seats, 20 rows of 30, were in the event's list of seats. Hibernate wrote each of them as its own row with the event's id in it. The 12 sequence calls follow from the sequence settings: each call reserves a block of 50 ids, and 600 / 50 = 12. The sequence calls ran inside em

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content