Add relationship support in code generator.