Hibernate / EclipseLink Interview questions
What is JPQL?
JPQL (Jakarta Persistence Query Language) is the standard, database-agnostic query language defined by the JPA specification. It looks similar to SQL but operates on entity objects and their mapped attributes rather than directly on database tables and columns.
SELECT e FROM Employee e WHERE e.department.name = :deptName ORDER BY e.name
EclipseLink parses JPQL and translates it into the appropriate SQL for the configured database dialect, so the same JPQL query can, in principle, run unmodified against different relational databases. For anything JPQL can't express, EclipseLink also supports native SQL queries and its own object-oriented Expression/Criteria API as alternatives.
More Related questions...