- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
此错误不允许我访问 jsondoc,我已经尝试了此处提供的一些解决方案,但仍然遇到同样的问题。
我希望我已经足够清楚我想要你帮助我的事情。
我留下了错误以及错误中提到的类之一。
Caused by: org.hibernate.loader.MultipleBagFetchException: cannot
simultaneously fetch multiple bags:
[com.credix.sib.canales.applicant.Applicant.phoneApplicant,
com.credix.sib.canales.applicant.Applicant.addressApplicant]
添加了错误中显示的类之一
@Entity
@Table(name="APL_APPLICANT", schema="CREDITAPPLICATION")
@NamedQuery(name="Applicant.findAll", query="SELECT a FROM Applicant a")
public class Applicant implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="APL_Id", insertable=false, updatable=false)
@ApiObjectField(description = "Id del Aplicante", required = true)
private Long id;
@Temporal(TemporalType.TIMESTAMP)
@Column(name="APL_CreateDate", updatable=false)
@ApiObjectField(description = "Fecha de creación del Aplicante", required = true)
private Date createDate;
@Column(name="APL_Email")
@ApiObjectField(description = "Email del Aplicante", required = true)
private String email;
@Column(name="APL_Identification", updatable=false)
@ApiObjectField(description = "Identificación del Aplicante", required = true)
private String identification;
@Temporal(TemporalType.TIMESTAMP)
@Column(name="APL_LastModifiedDate")
@ApiObjectField(description = "Fecha de la última modificación del Aplicante", required = true)
private Date lastModifiedDate;
@Column(name="APL_PrintName")
@ApiObjectField(description = "Nombre del Aplicante", required = true)
private String printName;
@OneToOne(fetch=FetchType.EAGER)
@JoinColumn(name="APS_Id")
@ApiObjectField(description = "Objeto Status del Aplicante", required = true)
private ApplicantStatus applicantStatus;
@OneToOne(fetch=FetchType.LAZY)
@JoinColumn(name="IDT_Id")
@ApiObjectField(description = "Objeto tipo de identificación del Aplicante", required = true)
private IdentificationType identificationType;
@OneToOne(fetch=FetchType.LAZY)
@JoinColumn(name="USU_IdCreate")
@ApiObjectField(description = "Objeto usuario creador del Aplicante")
private User userCreate;
@OneToOne(fetch=FetchType.LAZY)
@JoinColumn(name="USU_IdLastModified", updatable = false)
@ApiObjectField(description = "Objeto usuario ultima modificación del Aplicante")
private User userLastModified;
@OneToOne(fetch=FetchType.EAGER)
@JoinColumn(name="APL_Id")
@ApiObjectField(description = "Objeto que contiene los datos personales del aplicante")
private PersonApplicant personApplicant;
@OneToMany(fetch=FetchType.EAGER)
@JoinColumn(name="APL_Id")
@ApiObjectField(description = "Lista de direcciones del aplicante")
private List<AddressApplicant> addressApplicant;
@OneToMany(fetch=FetchType.EAGER)
@JoinColumn(name="APL_Id")
@ApiObjectField(description = "Lista de números telefónicos del aplicante")
private List<PhoneApplicant> phoneApplicant;
@OneToMany(fetch=FetchType.LAZY)
@JoinColumn(name="APL_Id")
@ApiObjectField(description = "Lista de tipos de notificación del aplicante")
private List<PublicityNotification> publicityNotification;
@OneToOne(fetch=FetchType.LAZY)
@JoinColumn(name="CTR_Id")
@ApiObjectField(description = "Objeto tipo de Pais", required = true)
private Country country;
public Applicant() {
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Date getCreateDate() {
return this.createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
public String getIdentification() {
return this.identification;
}
public void setIdentification(String identification) {
this.identification = identification;
}
public Date getLastModifiedDate() {
return this.lastModifiedDate;
}
public void setLastModifiedDate(Date lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
public String getPrintName() {
return this.printName;
}
public void setPrintName(String printName) {
this.printName = printName;
}
public ApplicantStatus getApplicantStatus() {
return this.applicantStatus;
}
public void setApplicantStatus(ApplicantStatus applicantStatus) {
this.applicantStatus = applicantStatus;
}
public IdentificationType getIdentificationType() {
return this.identificationType;
}
public void setIdentificationType(IdentificationType identificationType) {
this.identificationType = identificationType;
}
public User getUserCreate() {
return this.userCreate;
}
public void setUserCreate(User userCreate) {
this.userCreate = userCreate;
}
public User getUserLastModified() {
return this.userLastModified;
}
public void setUserLastModified(User userLastModified) {
this.userLastModified = userLastModified;
}
public PersonApplicant getPersonApplicant() {
return this.personApplicant;
}
public void setPersonApplicant(PersonApplicant personApplicant) {
this.personApplicant = personApplicant;
}
public List<AddressApplicant> getAddressApplicant() {
ArrayList<AddressApplicant>();
return this.addressApplicant;
}
public void setAddressApplicant(List<AddressApplicant> addressApplicant) {
this.addressApplicant = addressApplicant;
}
public List<PhoneApplicant> getPhoneApplicant() {
ArrayList<PhoneApplicant>();
return this.phoneApplicant;
}
public void setPhoneApplicant(List<PhoneApplicant> phoneApplicant) {
this.phoneApplicant = phoneApplicant;
}
public List<PublicityNotification> getPublicityNotification() {
ArrayList<PublicityNotification>();
return this.publicityNotification;
}
public void setPublicityNotification(List<PublicityNotification>
publicityNotification) {
this.publicityNotification = publicityNotification;
}
/**
* @return the country
*/
public Country getCountry() {
return country;
}
/**
* @param country the country to set
*/
public void setCountry(Country country) {
this.country = country;
}
}
希望大家给点建议
最佳答案
正如消息所述:您无法同时提取多个行李
。
要解决该问题,您可以:
将用于 phoneApplicant
和 addressApplicant
的集合类型从 List
更改为 Set
。此解决方案将导致集合没有顺序且没有重复项。如果您坚持要求订购可能存在重复项的集合,请使用下面描述的第二个选项。
使用注释 @OrderColumn
为两个列表提供订单列。
关于java - org.hibernate.loader.MultipleBagFetchException : cannot simultaneously fetch multiple bags,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50138385/
我正在尝试设计我的输入:文件。以下 SO 问题让我完成了 95% 的任务。区别在于我使用的是 HTML5 multiple=multiple 属性。 How to style "input file"
我一直在进行一项实验,其中多个调查参与者使用可穿戴技术聆听多首音乐来跟踪多条信息,两个例子是 BPM(心率)和 T(体温)。 目标是衡量每首音乐(以用户反馈为特征)对人类情感的影响。 目前,所有数据都
我使用 jquery 添加/删除输入 我使用append为日期/收入添加多个Tr 我还使用另一个附加来添加多个 td 以获取同一日期 Tr 中的收入 我添加多个日期输入,并在此表中添加多个收入输入 我
在 Android 中,有一种方法可以为项目中的所有模块生成签名的 APK。例如。我有以下项目 Project -- Library Module -- Module 1 -- Modul
我有一个用于网站展示的系统。 展览数据可能来自差异表中的多个数据。 喜欢这个设计: Table [ExhibitionType] used for differentiate category. Ta
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题? 更新问题,以便 editing this post 可以用事实和引用来回答它. 关闭 8 年前。 Improve
我正在使用 UILocalnotification...收到通知时,当应用程序处于事件模式时我打开 viewcontroller...但是如果同时收到多个通知...我如何打开多个 viewcontro
我遇到的问题是一个策略浏览器游戏,它有 7 种类型的值。问题如下: 我在 $_POST 中获得了 7 个不同的值,包括从索引 unit_1 到索引 unit_7。这 7 个值是 0 到 20 之间的整
这个问题已经有答案了: Search Large Text File for Thousands of strings (3 个回答) 已关闭10 年前。 我想在多个文件上“grep”多个正则表达式。
我经常对如何在我的应用程序中解决这个问题感到矛盾。我使用了很多选项,包括: 一个通用的多选 - 这是我最不喜欢和最很少使用的选项。我发现可用性非常糟糕,一个简单的误点击就会毁了你所有的辛勤工作。 “自
以下是 couchbase 中的示例文档之一。 { "name":"abc", "friends":["a","b","c"], "bestfriends":["x","y","z"] }
我有 4 张 table 。 表组 | ID | NAME | 1 Premium 2 Silver 表用户 | ID | group_id | NAME | 1
我正在开发一个使用第三方服务(Facebook、Google 等)对用户进行身份验证的应用程序。我为每个用户提供一个内部 ID(uuid v4),该 ID 与他们的第 3 方 ID 相关联。现在,我的
我是 bicep 新手,一直在努力实现 Bicep 脚本来部署具有许多主题和订阅的 Azure 服务总线。 我添加的每个主题都有可变数量的订阅(例如,通知主题可能有 3 个订阅,但分析主题可能有 2
我是 bicep 新手,一直在努力实现 Bicep 脚本来部署具有许多主题和订阅的 Azure 服务总线。 我添加的每个主题都有可变数量的订阅(例如,通知主题可能有 3 个订阅,但分析主题可能有 2
我必须创建一个大型数据库。它将保存来自 100 多个设备的数据,并不断更新数据库。每 10 秒,每个设备都会更新数据库中的一行。是为每个设备数据建立一个单独的表还是将数据与设备 ID 放在同一个表中更
我需要在 Activity 开始时显示“正在加载”进度对话框,然后在加载完成后显示一些内容。在我的 onresume 中,我有类似这样的代码: loadThread = true; Thread sh
我有一个 html 表单 当我提交表单时,假设对于 id = 1,数量为 5 或 对于 id = 3,数量为 8。如何在java脚本或jquery中获取这些值并将这些信息提交到服务器?我
我正在创建一个 Mozilla 扩展程序,通过单击“转换按钮”(标签:转换)将网页内容转换为其他语言它的标签被转换为英文,以便单击该按钮(标签:英文)内容被转换为原始形式 我尝试为每个选项卡设置属性“
我正在尝试根据 进行搜索 我通过运行代码从 select 中获取值: for($i=0;$i= '$age_from' AND users.user_age = '$age_from' AND u
我是一名优秀的程序员,十分优秀!