Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 187465

The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects/classes and a relational database. It is part of the EJB 3.0 specification and is the industry standard approach for Object to Relational Mapping (ORM).

0 votes

Entity objects with data external to the database

The duplicate airplaneId is not as big of a problem as the fact that your entity knows about an ExternalDataSource. It should not be responsible for fetching the Airplane, it's just an entity that doe …
Kayaman's user avatar
  • 1,950
2 votes

Best practices for retrieving data scattered over multiple tables

Data Transfer Objects are used (among other things) so you don't send your entities over the network, and therefore create a dependency between the entity and the output of your API, this is why you m …
Kayaman's user avatar
  • 1,950
2 votes

Query with a lot of fields and joins

Even using query with a smaller list of fields, I think the JPA will have to create all the main entities. …
Kayaman's user avatar
  • 1,950
1 vote
Accepted

In a Spring Boot Project, would you use interfaces for entities or not?

Disclaimer: These assumptions are based on a quick glance at the codebase It looks as if the interfaces are used as a "disguise" for entities to be directly used as domain objects / dtos. This does h …
Kayaman's user avatar
  • 1,950