Where clause was ambiguous in model and plugin