It will not be dropped after serialize and parse, because you only have one
field in the old message.

On Mon, Aug 8, 2016 at 3:39 PM, 'Mircea Markus' via Protocol Buffers <
protobuf@googlegroups.com> wrote:

> Hi,
>
> The oneof documentation
> <https://sites.google.com/a/google.com/protocol-buffers/user-docs/miscellaneous-howtos/oneof>
> states that if I move an optional field into an oneof, I "may lose some of
> your information (some fields will be cleared) after the message is
> serialized and parsed"
> Can you please confirm weather the value of the message is lost in the
> following use case:
> I currently have:
>
> message MyMessage {
>     optional string name = 1;
> }
>
> I would like to change to this to:
>
> message MyMessage {
>   oneof my_choice {
>     optional string name = 1;
>     optional MyType myName =2;
>   }
> }
>
>
> Will this ever case the existing values of MyMessage.name to be ever
> dropped?
>
>
> Thanks,
> Markus
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to