Skip to content

Exception when mapping an inherited property in a derived object #56

Closed

Description

@orenht

Hi,

I have a type B that inherits from type A, and a Property P defined in A.
When I try to map that property in type B, an exception is thrown at the DommelColumnNameResolver, that the key is not present in the entity maps dictionary.

I suggest that instead of using the DeclaringType for the lookup, use the ReflectedType.

Maybe this issue exists in other places too, I haven't checked.

Activity

  1. henkmollema commented on Jul 24, 2017

    @henkmollema
    Collaborator

    That is indeed a known issue. However, ReflectedType is not available in .NET Standard 1.3 (which Dapper.FluentMap and Dommel) targets. A future version might target .NET Standerd 2.0 which allows us to use RefelectedType again.

  2. modified the milestone: v2.0 on Aug 22, 2017
  3. self-assigned this
    on Aug 25, 2017
  4. modified the milestones: v2.0, v1.7.0 on Nov 16, 2018
  5. henkmollema commented on Nov 16, 2018

    @henkmollema
    Collaborator

    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.

    Dapper.FluentMap.Dommel is updated as well: https://www.nuget.org/packages/Dapper.FluentMap.Dommel/1.6.0.

    Please re-open or create a new issue if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址