|
|
@ -46,6 +46,9 @@ From the currated dependancies you can omit the version when you add them to you |
|
|
|
Session 3 - 28/10/2022 - ended here |
|
|
|
|
|
|
|
<hr> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Github Workflow |
|
|
|
|
|
|
|
[Starts from here](https://sparkers.udemy.com/course/spring-framework-5-beginner-to-guru/learn/lecture/17789252#overview) Github workflow. |
|
|
@ -137,5 +140,42 @@ Session 4 - 30/10/2022 : ended here |
|
|
|
<hr> |
|
|
|
|
|
|
|
|
|
|
|
### Equality in Hibernate |
|
|
|
|
|
|
|
[Starts from here](https://sparkers.udemy.com/course/spring-framework-5-beginner-to-guru/learn/lecture/17792132#notes) Equality in hibernate |
|
|
|
|
|
|
|
Leakage necessary - hibernates uses equals and hashcode methods. |
|
|
|
|
|
|
|
#### Equals and HashCode |
|
|
|
|
|
|
|
`@Override` the methods to have a logic around the id property. |
|
|
|
|
|
|
|
**Tips**: use `alt+insert` equals() and hashCode() metods for the `id` field |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### ToString |
|
|
|
|
|
|
|
**Tips**: `alt+insert` implement toString( ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Spring Data Repositories |
|
|
|
|
|
|
|
Spring Data with JPA helps us implement repositories. |
|
|
|
|
|
|
|
Prevents us to write all this "ceremonial code" that JDBC needs. |
|
|
|
|
|
|
|
Create a new package `repositories` |
|
|
|
|
|
|
|
For each domain object create an `interface`. |
|
|
|
|
|
|
|
Example: `AuthorRepository.java` |
|
|
|
|
|
|
|
```java |
|
|
|
public interface AuthorRepository extends CrudRepository<Author, Long> { } |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
***Session 5 - 31/10/2022 : [Starts from here](https://sparkers.udemy.com/course/spring-framework-5-beginner-to-guru/learn/lecture/17792132#notes) Equality in hibernate*** |
|
|
|
Session 5 - 31/10/2022 : ended here |