我尝试比较属性,但它是类和查询
@Query("select a from ApplyOfIP as a left join a.state where a.state = :state")
它将比较state.id,但我想比较州的属性
@Query("select a from ApplyOfIP as a left join a.state where a.state = :state " +
"and a.applicant.department like %:department% " +
"and (a.finallyIPName like %:ipName% or a.applyInfo.applyIPName like %:ipName%) " +
"and a.applicant.name like %:applicantName%")
Page<ApplyOfIP> findApplyOfIPSWithState(
@Param("page") Pageable pageable, @Param("state") State state
, @Param("department") String department, @Param("ipName") String ipName
, @Param("applicantName") String applicantName);