0
나는 3 개 필드를 기반으로 항목을 찾기 위해 쿼리를 실행하려고"또는 "조건이 내 쿼리입니다 생성 '과'보다는 '또는되고있다 사람 개체, 내가 신경 쓰는 3 가지 필드 : skillset, primarySkill 및 jobRole은 다른 개체의 인스턴스입니다. 원래 사람을 제외하고 해당 필드가 일치하는 사람을 찾고 싶습니다. 그러나 최대 절전 모드 쿼리가 나타납니다 "or"쿼리가 아닌 "or"쿼리를 만들 수 있습니다. 직접 SQL을 입력 할 수 있지만 멋지게 만드는 방법을 배우고 싶습니다.그루비 쿼리는 "
그리고 이것은 쿼리 생성기입니다 최대 절전 모드 내가 믿는
select this_.id as id5_0_,
this_.version as version5_0_,
this_.account_id as account3_5_0_,
this_.band as band5_0_, t
his_.end_date as end5_5_0_,
this_.job_role_id as job6_5_0_,
this_.name as name5_0_,
this_.primary_skill_id as primary8_5_0_,
this_.professional_market_place as professi9_5_0_,
this_.project_delivery_manager_id as project10_5_0_,
this_.project_manager_id as project11_5_0_,
this_.project_name as project12_5_0_,
this_.rate as rate5_0_,
this_.resource_deployment_manager_id as resource14_5_0_,
this_.skillset_id as skillset15_5_0_,
this_.start_date as start16_5_0_,
this_.work_location as work17_5_0_
from person this_ where this_.skillset_id=?
and (this_.primary_skill_id=?)
and (this_.job_role_id=?)
order by this_.name asc limit ?