以下数据是博士用户帐户的模型设计,其中@OneToMany与约会建立关系
@Id
public Long id;
@Lob
public String firstname;
@Lob
public String lastname;
@Lob
public String email;
@Lob
public String password;
@OneToMany(mappedBy="doctorid", cascade=CascadeType.ALL)
public List<DoctorAppointment> doctorappointments;
Doctor Appointment model deign
@Id
public Long id;
@Lob
public String date;
@Lob
public String time;
@Lob
public String specialization;
@ManyToOne
public DoctorUserAccounts doctorid;
我使用以下代码
成功获取了记录DoctorAppointment.find.fetch("doctorid").where().eq("patientid_id", patientid).orderBy("Date").findList();
我的问题是当我尝试从DoctorAppointment
将列表渲染到我的模板时Appointment ID Date Time Specialization Doctor ID
6 08/04/2018 10:15 AM Obstetrician models.DoctorUserAccounts@2
7 08/04/2018 11:45 AM Gynecologist models.DoctorUserAccounts@1
8 08/04/2018 11:45 AM Gynecologist models.DoctorUserAccounts@1
9 09/04/2018 11:45 AM Gynecologist models.DoctorUserAccounts@1
在Doctor ID列中,模型路径将呈现为“models.DoctorUserAccounts@2”,如何删除该标记。 在此先感谢...