Reading-Notes
My journal for Code Fellows
Project maintained by RogerMReyes
Hosted on GitHub Pages — Theme by mattgraham
Read 12
Summary
When creating a Spring data JPA there are a few things to remember when building it out. @Entity
indicates the JPA entity which are the objects you are storing. @Id
is annotated where JPA will recognize the objects ID in the table. @GeneratedValue
will generate this id automatically.
Spring Data Repositories
- CrudRepository - provides CRUD functions
- PagingAndSortingRepository - provides methods to do pagination and sort records
- JpaRepository - provides JPA related methods such as flushing the persistence and context and delete records in a batch
Things I want to know more About
Return to Code 401 Table of Contents