I'm trying ignore a entity property but I cannot do it. Looking for some how to do this, I found some examples but still can't do. How could I do this ?
trying
public class Caixa {
public virtual long id { set; get; }
public virtual DateTime dtOcorrencia { set; get; }
public virtual String historico { set; get; }
public virtual int tipoOcorrencia { set; get; } //1 entrada, 2 saida
public virtual decimal valorOcorrencia { set; get; }
public virtual FormaPagamento formaPagto { set; get; }
//should be ignored
public IList<Caixa> report = new List<Caixa>();
public Caixa () {
}
public IList<Caixa> getReport() {
return report;
}
}
Map
public class CaixaMap : ClassMap<Caixa> {
public CaixaMap() {
Table("CAIXA");
Id(c => c.id).GeneratedBy.Native();
Map(c => c.dtOcorrencia).CustomType<DateTime>();
Map(c => c.historico);
Map(c => c.tipoOcorrencia).CustomType<int>();
Map(c => c.valorOcorrencia).CustomType<decimal>().Precision(15).Scale(2);
Map(c => c.formaPagto).CustomType<GenericEnumMapper<FormaPagamento>>();
Map(c => c.report); //ignore it
}
}