Error when using underscores in attribute names in a custom module
Hello,
I'm running an instance of Sitefinity 5.0.2500, and I'm working with developing custom modules. I was attempting to add an attribute to my Model.Item class (that is, my data item class) that contained an underscore in it. For example:
private string first_Name;[DataMember]public string FirstName get return first_Name; set first_Name = value; Error 78 There is no field with name 'firstName' backing 'FirstName' property in type 'PrimaryFMAs.Model.PrimaryFMAItem'. You need to either change the Field Naming rules of the mapping configuration object or call HasFieldName(string) with the name of the backing field.ExceptionString:System.MissingFieldException: There is no field with name 'firstName' backing 'FirstName' property in type 'PrimaryFMAs.Model.PrimaryFMAItem'. You need to either change the Field Naming rules of the mapping configuration object or call HasFieldName(string) with the name of the backing field. at Telerik.OpenAccess.Metadata.Fluent.PropertyInfoHelper.GetFieldInfo(String fieldName, String propertyName, Type type) at Telerik.OpenAccess.Metadata.Fluent.PropertyConfiguration.GetMemberType() at Telerik.OpenAccess.Metadata.Fluent.PropertyConfiguration.AddConceptualItem(FluentMetadataSource fluentMappingSource, MetaPersistentType persistentType) at Telerik.OpenAccess.Metadata.Fluent.MappingConfiguration.AddEntityMapping(MetadataContainer metadataContainer, MetaTable table) at Telerik.OpenAccess.Metadata.Fluent.MappingConfiguration.AddEntityMapping(MetadataContainer metadataContainer) at Telerik.OpenAccess.Metadata.Fluent.FluentMetadataSource.CreateModel() at Telerik.Sitefinity.Data.OA.SitefinityMetadataSourceBase.CreateModel() at Telerik.OpenAccess.Metadata.Fluent.FluentMetadataSource.GetModelCore(MetadataContainer model) at Telerik.OpenAccess.Sdk.Enhancer.Enhancer.CrossDomainRunImpl(AssemblyLoader assemblyLoader) at Telerik.OpenAccess.Sdk.Enhancer.EnhancerBase.CrossDomainRun() C:\inetpub\wwwroot\_Shootmeintheface_a\PrimaryFMA\obj\Debug\PrimaryFMACatalogSample.dll PrimaryFMACatalogSample