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.
我有一个人实体属于一个人有一个国家,我想选择所有有人的不同国家。在 HQL 中很容易
从人 p 中选择不同的 p.Country
如何使用标准查询来做到这一点?
criteria.SetProjection(Projections.Distinct(Projections.Property("Country")));