setMasterField --> addCondition

setMasterField is deprecated and we should use addCondition instead.