如何在jpa查询中编写sql查询.....
select s.skill_name from K_ACTIVITI_POC.review r, K_ACTIVITI_POC.task t ,K_ACTIVITI_POC.task_skill ts, K_ACTIVITI_POC.skills s
where r.rev_id = t.rev_id
and t.task_id = ts.task_id
and s.skill_id= ts.skill_id
and r.rev_id =1
and t.task_id=1;
下面有java代码..........
public interface SkillRepository extends CrudRepository<Skill, Long> {
@Query("select s.skill_name from Review r Skill s INNER JOIN USER_SKILL ON s.skillId=sb.skillId INNER JOIN Task t ON t.taskId=sb.taskId where r.revId =:revId and t.task_id=:taskId;")
public List<Skill> findByAllSkills(@Param("revId") Long revId, @Param("taskId")Long taskId);
}