Jakarta ee EclipselinkJPA2.0“;不存在于该描述符中;虫子还是我的错?

Jakarta ee EclipselinkJPA2.0“;不存在于该描述符中;虫子还是我的错?,jakarta-ee,jpa,eclipselink,Jakarta Ee,Jpa,Eclipselink,我与以下关系有问题: @Entity public class Account { @OneToMany private Map<SomeEntity, WrapperEntity> myMap; // getter, setters, etc. } 但是:如果我将关系设置为双向,并将mappedBy添加到Account类中,项目将运行。这种行为是故意的吗?我忽略了什么吗 当使用双向关系时,另一种想法对我来说似乎很奇怪:我认为表格是以不完整的方式

我与以下关系有问题:

 @Entity
 public class Account {
     @OneToMany
     private Map<SomeEntity, WrapperEntity> myMap;
     // getter, setters, etc.
 }
但是:如果我将关系设置为双向,并将
mappedBy
添加到Account类中,项目将运行。这种行为是故意的吗?我忽略了什么吗


当使用双向关系时,另一种想法对我来说似乎很奇怪:我认为表格是以不完整的方式填写的。表
WrapperEntity
具有列
myMap\u key
,如果保存相应的映射条目,则不会在其中存储任何内容。我在eclipselink中查找了错误,但没有找到类似的错误。

OneToMany的默认设置应该使用关系表,所以我不明白为什么表“WRAPPERENTITY”会添加任何列来支持您指定的映射。是否有您在帖子中未指定的映射配置?还可以尝试发布完整的错误堆栈,以及WrapperEntity.otherEntities映射与问题的关系,因为它似乎不相关。请尝试@OneToMany(mappedBy=“someEntity”,targetEntity=someEntity.class)
 @Entity
 public class WrapperEntity {
     @OneToMany
     private Set<SomeOtherEntity> otherEntities;
 }
Exception [EclipseLink-93] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The table [WRAPPERENTITY] is not present in this descriptor.