Dapper-FluentMap
Dapper-FluentMap copied to clipboard
System.Exception: 'Duplicate mapping detected. Property 'Level' is already mapped to column 'Level'.'
public class BadgeMapper : EntityMap<BadgeVM>
{
public BadgeMapper()
{
Map(p => p.Rank.Level)
.ToColumn("Rank_Level");
Map(p => p.Seniority.Level)
.ToColumn("Seniority_Level");
Map(p => p.CompletedProfile.Level)
.ToColumn("CompletedProfile_Level");
Map(p => p.VerifiedProfile.Level)
.ToColumn("VerifiedProfile_Level");
Map(p => p.Popular.Level)
.ToColumn("Popular_Level");
}
}
I saw that you had a similar ticket. I don't know if it's the same situation, but the error is the same.
Do you have a full stack trace?
at Dapper.FluentMap.Mapping.EntityMapBase`2.ThrowIfDuplicateMapping(IPropertyMap map)
at Dapper.FluentMap.Mapping.EntityMapBase`2.Map(Expression`1 expression)
at VerusDate.Shared.Mapper.BadgeMapper..ctor() in C:\Users\dhiog\source\repos\drma-dev\VerusDate\src\Shared\Mapper\BadgeMapper.cs:line 13
It doesn't help much. But this is easy to reproduce, because I believe that the component is not recognizing attributes of another class
Are there no plans to support attributes of other classes? Like value objects? @henkmollema