Skip to content

Comparing objects of different types not working #14

@sekulicb

Description

@sekulicb

Hi, let's say I have an object of type Person that is base object and has two child types: Employee and Candidate. Now when comparing Employee to Candidate type I use following overload of Diff method:

var changes = source.Diff(destination, ComparionOptions.AllowCompareDifferentObjects, IgnoreProperties.ConfigureForSimpleTypes()); ( where IgnoreProperties is just a static helper class that returns an array of properties to ignore)

I can clearly see that source.FirstName and destination.FirstName are not equal, yet changes are empty every time. Both objects inherit common properties from Person. They have their own specific properties, but that was something I didn't tested. Any thought on this?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions