Entity Mapping | @ManyToMany @JoinTable with REST| Spring Data JPA | Spring Boot | Dev2Prod Coding
HTML-код
- Опубликовано: 5 фев 2025
- This video will focus on @ManyToMany Entity Mapping in Spring Data JPA development & testing via REST endpoints.
Github:
github.com/Dev...
In case you like this video please Like, Subscribe & press the bell icon.
Dev2Prod Coding
Wow this was awesome. There are some good tutorials out there but this is a level above anything else I've seen yet. Thank you!
Wow, thanks!
omg...so clear, y didnt i find this vid before, thanks a lot for this
Thanks! Clear explanation!
Thanks for watching!
Very well explained.. Keep it up
Thank you, I will
Você é muito inteligente, meu chapa! Parabéns!
Thank You!!
Thank you very much.
Nice Video Sir Thank you
So nice of you
Thank you very much!
You're welcome!
THANK YOU!
You're welcome!
Hi bro video after so long
BTW I reallly liked dur videos
Thank you so much
Well explained it
Thank You!!
I love you smart Indian wizard!
This helped a lot.
I do have one question though: is there a way to create an Employee with a Post method that also takes in input a set of Projects?
Ill' try to explain it better. In the video you create an Employee, you create a Project and then you add the projects to the employee one by one. I'm looking for a way to add multiple projects to the employee when I'm creating the employee. So in your example when creating the employee I would like to pass a name (employee name) and a set that contains multiple projects.
Thanks...Glad that you liked it.
Is there a way to create an Employee with a Post method that also takes in input a set of Projects? -> Yes, it can be done. You can use one-to-many mapping to add multiple projects to the employee. You can check ruclips.net/video/2fvUrpYG95w/видео.html for more on this.
thank u so much
Glad it helped!
Thanks a lot..!!
You are welcome!
💪💪💪💪
Thank you
You're welcome
What happens when we try to create a project with already assigned employees, will JPA take care of all the assigned employees by populating the third table? Like you are adding employees after the project creation one by one, what if I want when creating the project itself I want bulk adding of employees?
how does scenario looks in db that u didnt show what happened to the joineTable ???
Very nice explained..👏
Sir please make video on how to remove assigned project for particular emp.
I LOVE YOUUU BROOO!! THANKS
JsonIgnore stops the circular but also stops adding employee to Project, so just makes it a more complex one to many.
Use @jsonbackreferrence on top of get method
Finally i have found.....What i excellently want.
Glad to hear that!!
Bro, what about the sql sripit ,
Thank you, what i do whene i want to assign project to Employee ?
if u want assign one project to one person means go for @OneToOne,
if multiple project to one person mean go for @OneToMany,
if one project involved to many persons means @ManyToOne
if Many person collap with many project means go for @ManyToMany
how can i do if i want employee list in particular project along with project details ???
Is there any specific reason why you did not use @Getter and @Setter in employee entity?
I'm getting stack overflow error...even after using @JsonIgnore.... actually I'm using DTO classes
I am getting same error
What if the relationship has attributes ?
In MYSQL Workbench the project is assigned to employee/s but in Postman it doesn't show to be assigned. What could be the problem?
When I'm updating the record It is showing Customer with projects but when I'm try to get all records or find by id It is showing [ ] for projects.
I don't understand why ?
Can you help....Pls.
same problem
I am new to Spring boot and facing challenge to implement join query in specification. could you please help?
Please share your problem, devtoprodcoding@gmail.com
To delete a Project , we need to go throw every employee and remove the project form him to perform our task?
Can you tell me how to delete the mapping
why i'm getting, forbidden?
How to sort this column which has Many to many relation?
Use treeset
@@johnvick8861 it will remove duplicates
bhai tera project kisi kam ka nhi hai...tum ache ache comment khud hi fake account se karte ho kya
From where you got getAssignedProjects()in service
Please check Employee entity class, there I have defined
private Set assignedProjects = new HashSet();
getAssignedProjects() is the getter method for the same which is auto generated by lombok.Data annotation. Hope it helps!