0
利用Spring Repositories API,如何检索嵌入式Object
的DISTINCT
属性?以User
对象为例,我如何根据以下查询中不同部门名称选择所有不同的Department
对象。通过属性选择不同的嵌入对象
SELECT DISTINCT u.department from User u (based on Department name)
利用Spring Repositories API,如何检索嵌入式Object
的DISTINCT
属性?以User
对象为例,我如何根据以下查询中不同部门名称选择所有不同的Department
对象。通过属性选择不同的嵌入对象
SELECT DISTINCT u.department from User u (based on Department name)
@Query(从用户选择不同的U U其中u.name =:名称)
我认为这将回报你在找什么@Kurai
你会需要类似这样的...尝试...祝你好运
select distinct <object_property> from <tablename>
你做了什么尝试? – chrylis