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
IgnoreNonMapped is ignored when using RequireDestinationMemberSource #413
var config = new TypeAdapterConfig()
{
// other configuration here
RequireDestinationMemberSource = true,
};
// other mappings here
config.NewConfig<DataRow, Document>()
.Map(d => d.Id, dr => dr.Field<int>("Id"))
.IgnoreNonMapped(true);
When I now use config.Compile() to check the configurations I get an exception that on mapping DataRow to Document all properties (except Id of course) where neither configured to be mapped or ignored. My workaround for now is to use .RequireDestinationMemberSource(false) just for this one mapping, but shouldn't IgnoreNonMapped still work as inteded when using RequireDestinationMemberSource = true?
Activity
polom01 commentedon Apr 28, 2022
@andrerav
floatas commentedon Oct 3, 2022
@andrerav does this project participate in hacktoberfest ? There are some issues that the community could help out with.
duhapunk commentedon Dec 13, 2023
UP
ongun23 commentedon Feb 5, 2024
That is still happening.
DocSvartz commentedon Jan 23, 2025
@andrerav I think it is related to setting contradictory instructions)
This setting needs to be renamed. If that's what it's supposed to be.
.IgnoreNonMapped(true) != Ignore(all property)
This means don't use the default mapping. -> Only Manual Mapping mode (only Custom mapping).
All properties remain in the mapping processing -> not map by default, not manual map -> Exception
DocSvartz commentedon Jan 23, 2025
@andrerav I open PR #765 with fix to this issue )
DocSvartz commentedon Mar 19, 2026
This should be fixed in new release versions.
If your issue is still active, please reopen it or create new issue. Thanks.