가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Prepare Interview

JPA 면접 질문과 답변

관련 차이점

JDBC vs JPAJPA vs Hibernate

Ques 16. What is the difference between JPA and JDO?

JPA (Java Persistence API) and Java Data Objects (JDO) are two specifications for storing java objects in databases.

If JPA is concentrated only on relational databases, then JDO is a more general specification that describes the ORM for any possible bases and repositories.

In principle, JPA can be viewed as part of the JDO specification specialized in relational databases, even though the API of these two specifications does not completely match.

The “developers” of specifications also differ – if JPA is developed as JSR, then JDO was first developed as JSR, and now it is developed as an Apache JDO project.

도움이 되었나요? Add Comment View Comments
 

Ques 17. What is the attribute of the Entity class in JPA terminology?

JPA indicates that it can work both with properties of classes (property), designed in the style of JavaBeans, or with fields (field), that is, class variables (instance variables). Both types of elements of the Entity class are called attributes of the Entity class.

도움이 되었나요? Add Comment View Comments
 

Ques 18. What data types are allowed in the attributes of the Entity class (fields or properties)?

Valid attribute types for Entity classes are:

  1. primitive types and their Java wrappers,
  2. strings,
  3. any Java serializable types,
  4. enums;
  5. entity types;
  6. embeddable classes
  7. collection types

도움이 되었나요? Add Comment View Comments
 

Ques 19. What requirements does JPA set for Embeddable classes?

  1. Such classes must satisfy the same rules as the Entity classes, except that they do not have to contain a primary key and be marked with the Entity annotation.
  2. The Embeddable class must be marked with the Embeddable annotation or described in the XML configuration file JPA.

도움이 되었나요? Add Comment View Comments
 

Ques 20. What is a Mapped Superclass?

A mapped Superclass is a class from which Entity is inherited, it may contain JPA annotations, however, such a class is not Entity, it does not have to fulfill all the requirements set for Entity (for example, it may not contain a primary key).

Such a class cannot be used in EntityManager or Query operations. Such a class should be marked with the MappedSuperclass annotation or, respectively, described in the XML file.

도움이 되었나요? Add Comment View Comments
 

Most helpful rated by users:

Copyright © 2026, WithoutBook.