tmsmith / Dapper-Extensions

Dapper Extensions is a small library that complements Dapper by adding basic CRUD operations (Get, Insert, Update, Delete) for your POCOs. For more advanced querying scenarios, Dapper Extensions provides a predicate system. The goal of this library is to keep your POCOs pure by not requiring any attributes or base class inheritance.
1.79k stars 586 forks source link

Previosuly ignored read-only properties are not being ignored anymore #289

Open ALMMa opened 2 years ago

ALMMa commented 2 years ago

Affected version: 1.7.0 (this works with 1.6.3).

Consider the POCO:

public class MyPoco
{
   public int Id { get; set; }
   public string Name { get; set; }
   public string Something => "Lorem";
}

And its corresponding map:

public class MyPocoMap : ClassMap<MyPoco>
{
   public MyPocoMap()
   {
      Table("MyTable");
      Map(x => x.Id).Column("MT_CODE");
      Map(x => x.Name).Column("MT_NAME");
   }
}

This used to work: read-only properties were ignored (like the Something on the model) which are not being ignored anymore.

I already fixed by adding explicit Ignore() into those. However, was this an intentionally introduced breaking change or just a side effect of something else?