I am getting 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 is the property declaration 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 mapping.
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");
.
.
.
}
checked doubts similar to mine, but the solutions do not solve my problem. already tried to perform the mapping using
(c => c.ProductCode).Access.ReadOnly();
(c => c.ProductCode).Access.Field();
(c => c.ProductCode).ReadOnly();
to run the query directly in the database, does not show me any error, only the correct data.