Test if embed_relations_custom is set before generating code