Add generation for relations.