add support for has_an_belongs_to_many relations