fix has_many relation of generator