class generator generates relations