Skip to content

Commit

Permalink
protection contre un bug lorsque deux alias vers propriété même nom u…
Browse files Browse the repository at this point in the history
…tilisés dans des mappers
  • Loading branch information
gideruette committed Oct 3, 2023
1 parent bf10c45 commit c406fb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TopModel.Core/ModelStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ IEnumerable<ModelError> ResolveAliases(IEnumerable<AliasProperty> alps)
{
foreach (var p in param.Class.Properties.OfType<IFieldProperty>())
{
if (p.Name == property.Name && p.Domain != null && (p.Domain == property.Domain || Converters.Any(c => c.From.Any(cf => cf == p.Domain) && c.To.Any(ct => ct == property.Domain))))
if (!param.Mappings.ContainsKey(property) && p.Name == property.Name && p.Domain != null && (p.Domain == property.Domain || Converters.Any(c => c.From.Any(cf => cf == p.Domain) && c.To.Any(ct => ct == property.Domain))))
{
param.Mappings.Add(property, p);
}
Expand Down

0 comments on commit c406fb0

Please sign in to comment.