-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Mapping from a null array doesn't overwrite not null array with empty array when AllowNullCollections is false #936
Comments
I'm confused, you're mapping a type to itself? |
Maybe it's AssignableArrayMapper accounts for AllowNullCollections while Collection mapper does not? |
@jbogard I'm doing something like this in a unit testing utility:
Internally Querying the repository by My current work around is defining arrays as such:
|
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. |
The expectation is that when mapping from a new instance of
TestClass
thatArrayOfItems
will be an empty collection likeListOfItems
. In LinqPadone.Dump()
produces the following result:When
Mapper.Configuration.AllowNullCollections
equalstrue
both collections are appropriatelynull
.The text was updated successfully, but these errors were encountered: