Loading tutorials
application.properties file are. It also assumes you know what a JDBC URL is. By the end you will have a working setup that connects to a database, scans for entities and repositorie4 min read@Entity and @Table, and that you understand primary keys in SQL. It covers how JPA identifies an entity, the four generation strategies, how the choice affects batching, and the mistakes that cause trouble in practice.5 min read@Entity with @Id and @Column, and that you know what a derived query method is. It covers mapping data that has no identity of its own: groups of columns, enums, numbers, dates, and custom types.4 min read@Entity with an @Id, and you should know what a foreign key and a join table are in SQL. The examples reuse the Author and Book entities from the earlier chapters.4 min read@Entity and @Id, that you know what a Spring bean is, and that Spring Boot with Spring Data JPA is already on your classpath. It covers what a repository interface is, which methods you get for free, and what Spring builds at startup so that a7 min readAuthor and Book entities as in the earlier chapters. It also assumes you have a repository interface extending JpaRepository. You will learn how Spring Data turns a method name into a query, w4 min read@Query, and have the Book and Author entities from earlier chapters. You should also know basic SQL ORDER BY, LIMIT and OFFSET.5 min readAuthor and Book entities and a Spring Data repository, and that you know what @Transactional does at the annotation level. It explains what happens to an entity object between your code and the database. Most "mysterious" JPA behavior comes from this: cha4 min read@Transactional appears on a Spring bean. It covers where transactions begin and end, when Hibernate sends SQL, and the errors that come from misunderstanding both.5 min read@ManyToOne and @OneToMany, write Spring Data repositories, and use @Transactional. The examples use the Author, Book, BookRepository and CatalogService classes from earlier chapters.6 min read@Query methods, and that you understand lazy loading and the N+1 problem from earlier chapters. You should also be comfortable reading basic JPQL and SQL.5 min read@Entity and @Id. It also assumes you know the persistence context and entity states from the earlier chapters, and that you know how equals and hashCode behave in HashSet and HashMap.4 min read@Entity, you understand transactions and @Transactional, and y5 min read@DataJpaTest sets up, how to write repository tests that hit the database, and the mistakes that make a passing test meaningless.4 min read