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
I've written a project to test the performance of various mappers at different tasks, and it looks to have uncovered an issue in Mapster's deep-cloning.
The object being cloned has the following members (among others):
Foos : List
FooArray : Foo[]
Ints : IEnumerable
IntArray: int[]
As you can see from the screenshot, the post-mapping, cloned object has its FooArray elements and Ints properties copied, instead of mapped - that is, the values from the source object are being used directly instead of being cloned.
Cheers,
Steve
The text was updated successfully, but these errors were encountered:
for foo.FooArray[0] == foo.Adapt<Foo>().FooArray[0], this cannot reproduce in current source. But it can be reproduced from latest package. I dig into history, this had been fixed since August, but it might not yet been published. (sorry for this)
For IEnumerable<int>, I intentional reuse the same object (for enumerable of primitive) just because I think that IEnumerable is readonly by type definition. Originally, I built Mapster for mapping poco to dto only. But this test case is valid, I will fix this. Thank you.
Hi,
I've written a project to test the performance of various mappers at different tasks, and it looks to have uncovered an issue in Mapster's deep-cloning.
The object being cloned has the following members (among others):
As you can see from the screenshot, the post-mapping, cloned object has its FooArray elements and Ints properties copied, instead of mapped - that is, the values from the source object are being used directly instead of being cloned.
Cheers,
Steve
The text was updated successfully, but these errors were encountered: