Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
OpenXava 中的@ManyToOne 关系只允许我从另一个表的组合框中查找一个表以获取描述属性(仅限一个字段)。例如,如果我写:
@DescriptionsList @ManyToOne Product product
我得到一个包含所有产品描述字段的组合框。
我的计划是采用两个字段,例如 firstName 和 surName,然后将它们作为字符串连接到用于查找的描述文件中
如何加入 @DescriptionsList 组合中的两个字段?
@DescriptionsList 的 descriptionProperties 属性允许你指定几个用逗号分隔的属性,所以你可以这样写:
@ManyToOne @DescriptionsList(descriptionProperties="firstName, surName") private Customer customer;