我有2.0.1-development
TableColumn
FaAccount如下
@FXML
private TableColumn<FaAccount, String> tc_account;
和public class FaAccount {
private Account account;
...//getters
}
类依次是sql表的映射。在Account
课程内,我有Account
关系
one to one
通过调试我发现@JsonBackReference("account_benef")
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ResBenefID")
@NotFound(action = NotFoundAction.IGNORE)
private Account benefAccount;
public Account getBenefAccount() {
return benefAccount;
}
充满了必要的条目。问题是我无法在JavaFx表中反映其值并且没有抛出异常,只是此列为空。我是这样做的:
benefAccount
如何更改上面的代码,以便tc_account.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getAccount().getBenefAccount().getNumber()));
反映在我的表格中?