Access the full course here: javabrains.io/courses/spring_bootquickstart
Learn how to implement a relationship mapping using @ManyToOne as well as establish relationship based find-filter method in the JPA repository.
17 Comments on "Spring Boot Quick Start 31 – Adding Entity Relationship and Extending Repository"
Hey Koushik, I think you forgot to mention how to configure other databases. Can you do tutorial for that ?
the logic you went with , is convulted , the right take would be making the courses entity a field in the topic entity , isn't ?
The `Topic topic` instance variable in the `Course` class acts like the foreign key from course to topic. So as the annotation `@ManyToOne` says you will have many courses to one topic. Hope it helps
Even i was thinking on those line.Tpoic should have list of courses.IF we have topic within courses.Topics would be repreated within courses having same topic.Redundannt data…Kosuhik please help …if you have done that with some other concept in mind
Very well organized and progressive learning. Looking forward to reviewing your other playlist.
it's a neat feature to add just method names and forget the implementation part of it. awesome Koushik!!!
@Koushik.. Thanks for making these videos.Can you pls explain how hibernate comes in picture with spring data .. I read its an abstraction on top of JPA
why java is so tough 🙁 🙁
Hi Kaushik, I am getting below error on startupDescription: Field courseService in com.tutorial.springboot.controller.CourseController required a bean of type 'com.tutorial.springboot.service.CourseService' that could not be found.Action:Consider defining a bean of type 'com.tutorial.springboot.service.CourseService' in your configuration.
check whether you annotated the service class with @service or not.
Please how do i connect to mysql database?
Add the below prperties to the application.properties filespring.datasource.url=jdbc: you can find more info about it in below url'sdocs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.htmldocs.spring.io/spring-boot/docs/current/reference/html/boot-features-sql.html
jpa is good ,but when we write more complex sql dealing with our tables ,i think we should use mybaits ,so teacher can u make a serias video that introduce how to use mybatis ? probably can make a video that can integrate mybatie and jpa together.
thanks teacher ,that's really helpful
JPA also has the ability to accept queries in a SQL-like syntax called JPQL. Check this out: docs.oracle.com/html/E13946_06/ejb3_overview_query.html#ejb3_query_api
In CodeChannels.com, you can learn to code by watching videos and stay up to date with latest code shows, events and tutorials aggregated from various leading developer communities.
Copyright 2016 By CodeChannels.com All rights reserved.