Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken changes in 5.0.2; AddGlobalIgnore cannot be overriden by specific mapping configuration #1488

Closed
dsosunov opened this issue Jul 8, 2016 · 1 comment
Labels
Milestone

Comments

@dsosunov
Copy link

dsosunov commented Jul 8, 2016

var cfg = new MapperConfiguration(
                x =>
                    {
                        x.AddGlobalIgnore("Links");
                        x.CreateMap<Src, Dst>().ForMember(d => d.Links, opt => opt.UseValue(100));
                    });

            cfg.AssertConfigurationIsValid();

            var mapper = cfg.CreateMapper();

            var src = new Src { A = 10 };

            var dst = mapper.Map<Src, Dst>(src);

            Debug.Assert(dst.Links == 100, "dst.Links == 100");

In previous version 4.2.1 AddGlobalIgnore can be overridden by specific map configuration.
But in 5.0 if AddGlobalIgnore is defined any mapping definition is ignored.

@jbogard jbogard closed this as completed in 3868d52 Jul 8, 2016
jbogard added a commit that referenced this issue Jul 8, 2016
Allow overriding the global ignore; fixes #1488
@jbogard jbogard added the Bug label Jul 8, 2016
@jbogard jbogard added this to the 5.1.0 milestone Jul 8, 2016
@lock
Copy link

lock bot commented May 7, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants