InterviewSolution
| 1. |
Why To Use Jpa? |
|
Answer» Using JPA does not tie you to Hibernate. JPA gives you most of the features of plain old Hibernate, except: No criteria queries in JPA 2.0. Criteria query is a NEAT feature of Hibernate that constructs query using Java-based combinators INSTEAD of alternate query language, getting the benefit of IntelliSense and ECLIPSE’s REFACTORING tools. JPA doesn’t have Hibernate’s DeleteOrphan cascade type. Delete Orphan is a useful annotation that DIRECTS Hibernate to deletes entities in a collection if the parent is deleted, preventing orphaning. JPA doesn’t have an equivalent to Hibernate’s ScrollableResults. Using JPA does not tie you to Hibernate. JPA gives you most of the features of plain old Hibernate, except: No criteria queries in JPA 2.0. Criteria query is a neat feature of Hibernate that constructs query using Java-based combinators instead of alternate query language, getting the benefit of IntelliSense and Eclipse’s refactoring tools. JPA doesn’t have Hibernate’s DeleteOrphan cascade type. Delete Orphan is a useful annotation that directs Hibernate to deletes entities in a collection if the parent is deleted, preventing orphaning. JPA doesn’t have an equivalent to Hibernate’s ScrollableResults. |
|