The partyKey attribute is being marked as red in the following query with "can't resolve expression", despite the attribute existing in the mapping file and object. There are many instances in our named queries where the attributes of join-ed attributes are shown as unresolvable.
<query name="DispensingServiceAuditTrailDao.FIND_ORGANISATION_IIDS_BY_PARTY_KEY">
<![CDATA[
select org.iid from com.qxlva.nhs.mm.services.data.BOSDSOrganisation org
left join org.accreditedSystems accSys where accSys.partyKey in (:partyKeys)
]]>
</query>