Many to Many relation Spring Boot JPA Save operation using User and Role example part2 - Session 24

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ต.ค. 2024
  • Click the below link to download the latest Billing System Source code.
    pinepad.in/dow...
    More information about the Billing System Project. Watch this video
    • Billing System using S...
    This video explains how to save many to many relations. Many to Many relation nothing but one table's multiple records associated with another table vice versa. The best example is the User and Role table. A user can have multiple Roles. One Role can apply with multiple Users. This is called Many to Many Relationship. In order to implement many-to-many relationships in JPA, we have to use the @ManyToMany Annotation in the entity object and we need to using @JoinTable Annotation to tell which id need to associate with two tables. In the first parameter, I am saying that I want to create user_roles as a join table. in the second and third parameters, I am joining for each table's column using @JoinColumns.
    @JoinTable(
    name="user_roles",
    joinColumns=
    @JoinColumn( name="user_id", referencedColumnName="REC_ID"),
    inverseJoinColumns=@JoinColumn(name="role_id", referencedColumnName="REC_ID"))
    Source code @ following GitHub
    github.com/sur...
    Previous video link:
    • JPA Overview,Hibernate...
    I am developing a Billing System using Spring Boot. Already there are many many topics I have posted related to Billing System Project. Please subscribe to this channel to get all new updates about the Billing System and the first version of the Billing System Java code is absolutely free. It is available to download from here pinepad.in/dow... In the First version of the Billing System, I have implemented all kinds of Technical topics. Technical topics nothing but, integrating Spring boot logging framework, Spring Boot validation framework, and many more. Please follow the Billing System which I developing, it is very useful who wanted to get real-time project experience in Spring Boot. you can easily crack the interviews. Even I am ready to explain the technical topics if you have any doubts about the Project. You can find my contact. You can find my contact @ www.pinepad.in. Also, I have given my LinkedIn, Instagram, and FB profile in my Channel homepage banner ( / @itgarden9753 )
    I have posted all technical related topics on the following site. Please check it out
    pinepad.in/blog/
    If you want to only Billing-System-related Technical Topics, please go to the following link.
    pinepad.in/cat...
    Please follow me on / suresh-stalin . The reason I am asking is, if I post any Technical article or billing System-related Article you will be getting a notification.
    Click the below link to download the latest Billing System code.
    pinepad.in/dow...
    All Billing System-related videos update in the following post
    pinepad.in/jav...
    #springbootjpatutorial #springbootrespository #springboothibernate #springbootforbeginners

ความคิดเห็น • 1