I get the following exception:
"Could not find a setter for property 'ProductCode'in class ...OrderItem.class "
The property (ProductCode) is one of my table keys.
See how property declarations are in the class.
public class OrderItem : EntityBase { public virtual short Company { get; set; } public virtual int Order { get; set; } public virtual string Seri { get; set; } public virtual string ProductCode { get; set; } public virtual string Crop { get; set; } . . . }
below this my display.
public MapOrderItem() { Table("IPED"); CompositeId() .KeyProperty(c => c.Company, "C_EMP") .KeyProperty(c => c.Order, "P_PED") .KeyProperty(c => c.Seri, "S_PED") .KeyProperty(c => c.ProductCode, "C_PSV"); Map(c => c.C_CFO).Not.Nullable(); Map(c => c.AnotherCurrency).Column("V_IPE"); . . . }
I checked doubts similar to mine, but solutions do not solve my problem. already tried matching with
(c => c.ProductCode).Access.ReadOnly(); (c => c.ProductCode).Access.Field(); (c => c.ProductCode).ReadOnly();
to run a query directly in the database does not show me any error, only the correct data.
source share