更新时间:2023-09-15 11:51:52
的JPA实现。如果您在代码中使用纯粹的JPA,那么如果出现需求,您可以***地更改为不同的实现。例如, EclipseLink / TopLink 和 OpenJPA 是针对不同客户可能需要的实现。一个完整的实现列表是这里。
如果您不得不使用hibernate提供的任何不属于JPA规范的奇特功能,则应该在您的代码库中使用hibernate特定的API。 hibernate论坛此处的相关讨论。
I am using Hibernate in our projects and annotation based configuration for Hibernate Domain Pojo Objects. For Annotations based configuration we have two options
javax.persistence.*
org.hibernate.annotations.*
Currently we use JPA based annotation configuration for our POJO files and Hibernate native API like SessionFactory, Session, etc to open session and perform DB operations.
Need your help in below things,
Hibernate provides one of the JPA implementations. If you use purely JPA in your code, you are free to change to a different implementation if a requirement arises. For example, EclipseLink/TopLink and OpenJPA are implementations which may be required for a different customer. A comprehensive list of implementations is here.
If you are compelled to use any exotic features provided by hibernate which are not in JPA specification, you should go for hibernate specific APIs in your code base. A related discussion from hibernate forum here.