热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

JPA 面试题与答案

相关差异对比

JDBC vs JPAJPA vs Hibernate

问题 31. How can the JPA metadata that is the information about entity type, embeddable class, etc., be obtained?

The Metamodel interface is used by JPA for this purpose.

We can obtain this interface's object using the method of getMetamodel from an EntityManger or EntityMangerFactory.

这有帮助吗? 添加评论 查看评论
 

问题 32. What is a unique inheritance strategy not present in the JPA specification but present in Hibernate?

The implicit polymorphism strategy is present in Hibernate but it is not present in JPA.

这有帮助吗? 添加评论 查看评论
 

问题 33. What do you mean by JPQL (Java Persistence query language), and how does it differ from SQL?

  • JPQL is almost similar to SQL, but the names of entity classes and attributes are used instead of the database columns.
  • Also, the data types of entity attributes are used by the query parameters instead of database fields.
  • There is automatic polymorphism in JPQL, unlike SQL. KEY, TREAT, VALUE, MAP, and ENTRY are some of the unique functions of JPQL.

这有帮助吗? 添加评论 查看评论
 

问题 34. What is polymorphism in JPQL queries?

This means that regardless of the inheritance strategy, the objects of all the descendant classes are returned in each entity request.

这有帮助吗? 添加评论 查看评论
 

问题 35. How can the polymorphism be turned off in JPQL?

We can use the TYPE function in the where condition for turning polymorphism off in JPQL.

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。