anerjan / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

Enable null values to be treated as "real values" during merge. #219

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
ondrej.storek@gmail.com
==============

What steps will reproduce the problem?
1. Create any class with live objects or lists.
2. Clone it.
3. Set some objects to null and clear lists in original.
4. Serialize original and merge it clone.

What is the expected output? What do you see instead?
Clone should look as original class. Null values should be treated like every 
other value in class and not as "no change". 

Same problem is with list, that 2 item list will overwrite 5 item list, but 0 
item list wont.

What version of the product are you using? On what operating system?
v2 beta

I know this is probably breaking some concept, but it would be nice if that 
work at least for members marked as "AsReference" or enable it somehow else 
(something like OverwritePolicy)

Original issue reported on code.google.com by ondrej.s...@keenswh.com on 10 Aug 2011 at 6:13