我想在spring jpa下执行这个sql。但我无法使用Specification接口来构建规范。你能告诉我吗?
select * from
(
select distinct user_uid from ua_rel_user_role as userrole0_
where ( userrole0_.deleted_at = 0)
and (userrole0_.role_uid
in (:role_uid))
and userrole0_.product_code=:productCode
) as r
order by r.user_uid,r. product_code
desc limit 0,10;
您必须使用JPA命名查询。关注这个reference。