Open enrico-padovani opened 2 years ago
I found this old issue #506 that seems to be the same problem.
Any advice how to solve it?
This would have to be fundamentally changed so that it used a Dictionary instead of an optimized list. Definitely a major version thing.
I don't know much about NPoco internals, but could it be possible to use the defined primary key over the entity in order to check if the object has already been added to the list?
If no PK is defined fall back to object equality.
Hi,
I'm facing an issue where using IncludeMany.
When there are more childrens for the main entity, the query composed repeats the main entity Id.
This causes the object with the same repeated id to be materialized multiple times.
If I order the main entity by the id column, the problem is fixed but this is not convenient because we need to have another order by after the object materialization.
NPoco Version 5.3.2 .NET 6