Add support for has_and_belong_to_many relationships