【发布时间】:2020-10-22 21:10:42
【问题描述】:
我在 ordinateur 中有 2 个类 ordinateur 和 salle 由 ManyToOne 映射,我想在 ordinateur 表中显示到 salles 的 id,但我得到的是 salle 的内存地址
This is the mapping in the ordinateur class
@ManyToOne
@JoinColumn(name="code_salle")
private Salle salle;
public Salle getSalle() {
return salle;
}
and here where i want to display it
<h:column>
<f:facet name="header">Code de la salle</f:facet>
<h:outputText value="#{ordinateur.salle}"></h:outputText>
</h:column>
【问题讨论】: