Shouldn't this become (('01','02','03'),'0X'), instead of the entity_id part being pushed into a filter, since org_id and entity_id are ANDed together and entity_id is the next PK column?