Entity Mapping | @OneToOne, @OneToMany, @JoinColumn| Spring Data JPA | Spring Boot | Dev2Prod Coding

Sdílet
Vložit
  • čas přidán 27. 07. 2021
  • This video will focus on Entity Mapping in Spring Data JPA basic concept. Example to demonstrate use of @OneToOne, @OneToMany, @JoinColumn using Spring Boot.
    Github:
    github.com/Dev2ProdCoding/spr...
    In case you like this video please Like, Subscribe & press the bell icon.
    Dev2Prod Coding

Komentáře • 97

  • @jaymichalek1693
    @jaymichalek1693 Před rokem +2

    Awesome explanation. I hope you can make more videos.

  • @ushasharma2631
    @ushasharma2631 Před 2 lety +31

    Just because of your perfect solution and exact explanation instead of keeping it long you made it short. I am subscribing your channel. Good Efforts thank you :)

  • @wantedlepota9960
    @wantedlepota9960 Před rokem +8

    I like the fact that you have already created the classes(entity, controllers) before you record the video, which makes the video simple and short

  • @siyansunny3090
    @siyansunny3090 Před 2 lety

    Good explanation.. waiting for next video...

  • @karthickdk9313
    @karthickdk9313 Před 2 lety +1

    thank u so much.. upload more videos .. based on entity

  • @indranilganguly4750
    @indranilganguly4750 Před rokem +2

    Great Video...Helped me a lot..Thanks

  • @virendrasingh-en1yy
    @virendrasingh-en1yy Před rokem

    nice explanation clear my all doubts with in short time thankyou so much

  • @janstefangehrmann1139
    @janstefangehrmann1139 Před 3 měsíci

    Thank you so much. Now I understand how to handle relations :)

  • @abhiramnair2195
    @abhiramnair2195 Před 2 lety

    nice video..cleared all my doubts.thank you

  • @harishchandra8057
    @harishchandra8057 Před 2 lety +1

    Nice explanation sir..

  • @tonycavanagh1929
    @tonycavanagh1929 Před rokem +1

    Brilliant, well presented and consice.

  • @gauravsrivastava17
    @gauravsrivastava17 Před měsícem

    Short and to the point 🔥🔥🔥🔥

  • @jitendrapatil3276
    @jitendrapatil3276 Před rokem

    Great Video. Just subscribed....

  • @samnayakawadi
    @samnayakawadi Před 2 lety

    Subscribed. Thanks.

  • @manideepkumar959
    @manideepkumar959 Před 9 měsíci +3

    Bro, in address class , during 1-1 7:59 before and after using @OneToOne(mppedby="address") the output/table structure of address is same na, then can u tell me what is the use of that annotation

  • @jakub.686
    @jakub.686 Před rokem

    Thank You for this video, it helped me a lot

  • @swadeshswaroopbehera8465
    @swadeshswaroopbehera8465 Před 2 lety +1

    great explanation. keep up the good work.

  • @m_sharif
    @m_sharif Před rokem

    Just to the point.. Thank you.

  • @neerajayarasani8456
    @neerajayarasani8456 Před rokem +1

    short and clear. Thank you

  • @shaharukhshaikh4676
    @shaharukhshaikh4676 Před rokem +1

    No one beat this content on CZcams thnks bro🎉

  • @kosalaTravellingVlogs27
    @kosalaTravellingVlogs27 Před rokem +1

    Perfect Explanation. Thanks

  • @connect2soumen
    @connect2soumen Před 2 lety +1

    Neat and clean video.

  • @sproutboot
    @sproutboot Před rokem +1

    I might sound stupid but I found it interesting that f.k @OneToOne private Address address, Employee class has a attribute of address which data type is Address, and it actually stores int value which is addressID? and by setting cascade.all, when we send request payload for saving emps, it will affect Address class and save address info on Address table. And the fk column in emp table will show just int value(AddrID). I learned a lot. and I hope I understand correctly. Thanks!

  • @zuberdiwan8123
    @zuberdiwan8123 Před rokem +1

    Very Good Explained..Thank You.....

  • @ash416
    @ash416 Před rokem

    Hello bro please reply
    I have to separate entities flight and airport and I don't want to save the data for airport while saving flight,since airport table is already populated
    Hope it make sense

  • @user-hm2mk1ql3l
    @user-hm2mk1ql3l Před rokem

    So good explained! Just one question, first OneToOne Example, in Entity Employee_Detail you add Address address, which created automatically a FK fk_add_id, should a index be created to that fk_add_id, if data volumn is very big? Thank you!

  • @thirumalyadav7509
    @thirumalyadav7509 Před rokem

    Best explanation bro

  • @hrishikeshmukherjee8988
    @hrishikeshmukherjee8988 Před 2 lety +1

    wow

  • @kirindev
    @kirindev Před rokem +1

    thank you

  • @harishchandra8057
    @harishchandra8057 Před 2 lety

    plz upload the next part ...onetomany bidirectional and manytomany

  • @Rasmusorum
    @Rasmusorum Před rokem

    How does it make sense to make a @onetoone relationship? Why not just embed the class?

  • @atharvsingh6901
    @atharvsingh6901 Před rokem

    Much appreciated dude🙂🙏

  • @suthar_ravi
    @suthar_ravi Před 9 měsíci +1

    Great explanation 👌🏻😇

  • @Doum4n
    @Doum4n Před 4 měsíci

    Thank you very much

  • @user-zl9ub5hq4v
    @user-zl9ub5hq4v Před 7 měsíci +1

    Thank u!

  • @kotidinta1585
    @kotidinta1585 Před 2 lety +1

    Bro nice explaination. Could please make video on total spring project

  • @Emanuel-yb3qk
    @Emanuel-yb3qk Před 3 měsíci

    Thanks for explaning it too easy bro. Greetings from Mexico.

  • @forinda
    @forinda Před rokem +1

    Perfect explanation😊

  • @HimanshuVerma-ko7vr
    @HimanshuVerma-ko7vr Před rokem +1

    very helpful

  • @HusnainAshfaq-kr5or
    @HusnainAshfaq-kr5or Před 2 měsíci

    good

  • @surajdevrajak9267
    @surajdevrajak9267 Před rokem +1

    Good work man

  • @simon8284
    @simon8284 Před 4 měsíci

    Sex bro Sex, even I couldn't understand this from Java Brains, Be Coder, and Code With Durgesh. You made a flawless victory...

  • @weixiangng8279
    @weixiangng8279 Před 7 měsíci

    How to implement it with Angular though?

  • @ayushkumarjajodia8828
    @ayushkumarjajodia8828 Před 2 lety +1

    what will be the difference in table structure b/w uni and bi direction of one to one mapping?

  • @sonubandigi3788
    @sonubandigi3788 Před 11 měsíci

    bro dhanyawad

  • @HuieChannel
    @HuieChannel Před 3 měsíci

    bro these indians are hella clutch

  • @ankushkamble911
    @ankushkamble911 Před rokem

    Great Explanation bro...but one error is occuring actually when we run many to one first time it will save the data but if we add another member of same addresse it will update the data...that means fk_emp_id 1 will replace by 2 so...what to do plz help me

    • @dev2prodcoding
      @dev2prodcoding  Před rokem

      Can you post your employee and address entity here for one to many mapping?

  • @wellingtonfjr
    @wellingtonfjr Před 10 měsíci

    nice video!! +1 sub, thanks

  • @pranshugautam8890
    @pranshugautam8890 Před rokem +3

    I want to ask one q : when you used unidirectional you have not written one to one in address class and when you showed bidirectional then you write one-to-one in address class but there was no difference in output that you showed so why we have to write one-to-one in address class when there is no difference in output?

    • @donDan94
      @donDan94 Před 11 měsíci

      yeah right, I just watched the video and had the same question. Can I ask you, did you find any information about this, is there any difference? cheers!

    • @ChVenki
      @ChVenki Před 2 dny

      I too have the same question

  • @Leo-fi6bg
    @Leo-fi6bg Před rokem +2

    Hi bro .. how to configure my slq or post man in application properties.. will u please solve that

    • @dev2prodcoding
      @dev2prodcoding  Před rokem +1

      czcams.com/video/3wIRc94piU8/video.html please check this video where I have explained how to configure DB using application.properties file.
      Code Link - > github.com/Dev2ProdCoding/spring-data-jpa-springboot/blob/master/src/main/resources/application.properties

  • @venkateshejjigiri-4137

    fk_add_id is not reflecting in employee table. and no data in adreess table. pls help me

  • @sachithnanayakkara4027
    @sachithnanayakkara4027 Před 2 lety +3

    How about One to Many & Many to One Mapping and also many to many mapping? Can you make a video for that

  • @KlanBr1
    @KlanBr1 Před 11 měsíci

    if i duplicate my request in postman, so duplicate my entities, that not shoul be happen, because then i have duplicate employees and addresses, how do yo stop this behavior, you put some logical in your service?(sorry for my english)

  • @SKMishra2023
    @SKMishra2023 Před 2 lety +1

    8:12

  • @roshanpawar571
    @roshanpawar571 Před 2 lety +1

    Nice video..... but how to update mapping data

    • @dev2prodcoding
      @dev2prodcoding  Před 2 lety

      Thanks @roshan....I am assuming by update mapping data you mean updating records in db. For updating you can use same method you used to save it i.e saveAll() or save().
      Let me know in case of any other query.

  • @vinaymathapati4077
    @vinaymathapati4077 Před rokem +1

    Where is properties file

    • @dev2prodcoding
      @dev2prodcoding  Před rokem

      github.com/Dev2ProdCoding/spring-data-jpa-mappings/tree/master/src/main/resources

  • @dod-do-or-dont
    @dod-do-or-dont Před 2 měsíci

    Why 90% od tutorials are low quality indian ones?

  • @kandruvinay6736
    @kandruvinay6736 Před 2 lety

    Push the file to git

    • @dev2prodcoding
      @dev2prodcoding  Před 2 lety

      url : github.com/Dev2ProdCoding/spring-data-jpa-mappings.git

  • @tobyhamilton2153
    @tobyhamilton2153 Před rokem +1

    You didn't even show how to right at the get mapping, so you just showed how to do the annotations, how is someone meant to known how to make the get request!!!

  • @venu5791
    @venu5791 Před rokem

    can you add @jsonbackReference, @jsonmanagedreference along with the mappings

  • @nguyenquangtinh4911
    @nguyenquangtinh4911 Před rokem +1

    thank you