I'm using Leprechaun for code generation and the custom field mapping I'm trying to implement isn't working. The field is generated as type String in every case, so I know the custom mapping is failing but I do not know why. I've tried the following variations:
<metadataGenerator type="Leprechaun.MetadataGeneration.StandardTemplateMetadataGenerator, Leprechaun" singleInstance="true">
<fieldType id="{ae1b2067-94a6-4357-a997-00a5052a98fa}" type="I_AssociateBio" />
</metadataGenerator>
<metadataGenerator type="Leprechaun.MetadataGeneration.StandardTemplateMetadataGenerator, Leprechaun" singleInstance="true">
<fieldType id="{ae1b2067-94a6-4357-a997-00a5052a98fa}" type="MySite.Feature.AssociateBio.I_AssociateBio" />
</metadataGenerator>
<metadataGenerator type="Leprechaun.MetadataGeneration.StandardTemplateMetadataGenerator, Leprechaun" singleInstance="true">
<fieldType id="{ae1b2067-94a6-4357-a997-00a5052a98fa}" type="custom=MySite.Feature.AssociateBio.I_AssociateBio" />
</metadataGenerator>
I can tell that it's getting picked up, because firstly, the field is a Droplink so without the custom mapping it outputs as a Guid; and secondly, it shows the Field Type from my mapping in the metadata:
/// Represents Person field
/// <para>Field Type: custom=MySite.Feature.AssociateBio.I_AssociateBio</para>
/// <para>ID: {ae1b2067-94a6-4357-a997-00a5052a98fa}</para>
/// <para>Section: Employee Spotlight</para>
/// </summary>
[SitecoreField(FieldName = IEmployeeSpotlightConstants.Person_FieldName)]
string Person { get; set; }/// <summary>
I cannot get it to output MySite.Feature.AssociateBio.I_AssociateBio Person { get; set; }
I_AssociateBio is in another project, but it's referenced in the EmployeeSpotlight project, and when I manually change the type of the field to I_AssociateBio Person
it's valid