support AssociationProxy in has/any search