You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
1.5.* fails with Dapper multi mapping where 1.4.1 works #42
We are seeing a similar issue when moving to 1.5.1 from 1.4.x, in our case, it seems to be directly related to inheritance hierarchies. When we register a global property prefix, we're seeing the duplicate property map error showing up. Commenting out the ForEntity<> for the derived classes (or base class) makes the problem go away, but prevents the conventions from apply to those excluded entities.
Based on the test project, although I've been unable to get it to fail at this point (haven't had time to figure out what code path Dapper is using), but setting up the mapping to look like:
Activity
henkmollema commentedon Aug 16, 2016
That's odd. Nothing should have changed there. Does your entity and database table still looks the same?
cpisto commentedon Aug 16, 2016
Yes everything is the same, swapping 1.5.* for 1.4.1 fixes the issue.
In my example, both tables have an id column, however only one of the entities being multi-mapped has a matching Id property.
I will try to find time to build a specific test case later this week.
bengavin commentedon Dec 14, 2016
We are seeing a similar issue when moving to 1.5.1 from 1.4.x, in our case, it seems to be directly related to inheritance hierarchies. When we register a global property prefix, we're seeing the duplicate property map error showing up. Commenting out the ForEntity<> for the derived classes (or base class) makes the problem go away, but prevents the conventions from apply to those excluded entities.
Based on the test project, although I've been unable to get it to fail at this point (haven't had time to figure out what code path Dapper is using), but setting up the mapping to look like:
edit: use syntax highlighting
henkmollema commentedon Nov 16, 2018
This have been fixed for applications targeting full .NET (e.g. 4.5 or higher) and .NET Core 2.0 and 2.1 in version 1.7.0: NuGet and release notes.
Please re-open or create a new issue if the problem persists.