© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
A. SaccoBeginning Spring Datahttps://doi.org/10.1007/978-1-4842-8764-4_4

4. Persistence and Domain Model

Andres Sacco1  
(1)
Buenos Aires, Buenos Aires, Argentina
 

In the previous chapter, you learned the basics of Spring and how to build a project that exposes an endpoint that persists information into a database using an architecture of layers with Spring Data. Still, the endpoint only obtains the knowledge of one entity without any connection or relationship with another. This type of situation in the relational database is not so common.

This chapter explains the relationships between the entities and how to use inherence to reduce duplicate code in Java. ...

Get Beginning Spring Data: Data Access and Persistence for Spring Framework 6 and Boot 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.