Added smartWhere as a first class citizen to hasOne.