Not working with generic or abstract entity
manohardelhi opened this issue · 2 comments
manohardelhi commented
public abstract class BaseEntity<TId>
{
public BaseEntity(TId id)
{
Id = id;
}
public TId Id { get; set; }
}
public abstract class PeopleBaseEntity : BaseEntity<string>
{
public PeopleBaseEntity():base(string.Empty)
{
}
public string? Name { get; set; }
public string? Gender { get; set; }
}
[Table("people_mans")]
public class Man : PeopleBaseEntity
{
public int Age { get; set; }
}
var connection = new MySqlConnection(connectionstring);
var people = connection.Select<Man>(x=> x.Name == "Manohar");
Console.WriteLine(JsonSerializer.Serialize(people));
Genrated SQL : select * from people_mans
where (PeopleBaseEntities
.Name
= @p1)
henkmollema commented
Does setting DommelMapper.IncludeTableNameInColumnName = false
at application startup help?
csalexsander commented
Does setting
DommelMapper.IncludeTableNameInColumnName = false
at application startup help?
This property is not present in version 3.0.0 of the Dommel package.
Looking at the changes, it was made in 2022, but the last version of Dommel was published on NuGet on 12/21/2021