我正在使用 Felix OSGi 框架,其中不支持 EclipseLink 动态编织,所以我更喜欢使用 OpenJPA(或者可能是 Hibernate)。但是,我在几个地方需要的一个特性是可变的一对多关系,其中一个实体指的是不同类的实体的集合(它们共享相同的超类)。其他提供商是否支持?该链接仅提及 EclipseLink,但它可能不是最新的。
1 回答
DataNucleus JPA (and JDO) supports relations using interfaces, abstract classes etc, since that is part of the JDO spec (but not the JPA spec).
Don't expect the wikibooks page(s) to reflect what other implementations provide since it was written AFAIK by Oracle members who, naturally, will include what they know about. The pages are very good for general spec-based JPA info, but you should always look at the docs for the individual implementations for details of what they provide as vendor extensions. The pages also don't make it always so clear what is and isn't part of the spec or a vendor extension.