Тёмный

ManyToMany in Kotlin Spring Data JPA (with source code) 

Vladsave Coding
Подписаться 1,4 тыс.
Просмотров 2,7 тыс.
50% 1

In this video we are going to implement a many to many relationship in a Spring Data JPA Kotlin project. You will need IntelliJ IDEA CE, MySQL and an API client like Postman or Insomnia if you want to follow along.
Source code, both starter and final
vladsave.com/?p=260
Chapters:
00:00 Introduction
00:35 Starter code
05:15 Add the Kotlin code
09:34 Create the join table in the database
15:05 End to end testing of the read path
17:24 Add a write API endpoint
22:30 Outro

Опубликовано:

 

23 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@ejfuhr
@ejfuhr Год назад
First, great tutorial! but i've been having trouble getting Liquibase to install the data. It works great when creating the student and course tables, but doesn't install "Alice", "Bob" "Charlie" or the courses. I grabbed our source code, hooked up with my MYSQL, created the tables but the inserts were not performed. ANy ideas as to why?
@vladsavecoding4111
@vladsavecoding4111 Год назад
Thanks. That's strange because the table creation and row inserts are in the same changeSet so they will happen all or none. Are you getting an error when starting the project? Also, you are using MySQL as the database, right? Just making sure
@andrewbelozertsev6911
@andrewbelozertsev6911 Год назад
Thank you, Vlad, for your tutorial. It have been very usefull for me. But I have an issue, maybe you can help me. I have similar tables. I have student, courses and I need to store scores. How can I Add and Use the third column in m2m relationship? In the result I need to send with get Request something like this: { Student-id, Student-name, Student-courses:{ course-id, course-name, course-scores } }
@vladsavecoding4111
@vladsavecoding4111 Год назад
You can create a new entity for scores and then do a new relationship from student to score. It can be ManyToMany but for scores I think OneToMany is more appropriate
@andyhuizenga5136
@andyhuizenga5136 Год назад
Hi! Do you have time today? My app that is based on your video has a little problem.
@vladsavecoding4111
@vladsavecoding4111 Год назад
I responded to your email, check it out
Далее
REST input validation in a Spring Boot Kotlin project
8:42
Копия iPhone с WildBerries
01:00
Просмотров 2,8 млн
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
Просмотров 1,6 млн
Crowdstruck (Windows Outage) - Computerphile
14:42
Просмотров 122 тыс.
What happened to Bluelearn? Final Thoughts
9:04
Просмотров 72 тыс.
Use MongoDB in a Spring Boot Kotlin project
32:26
Просмотров 1,3 тыс.