Yes, the tag numbers have to be the same.

If you have code that was generated from the original .proto file, look
inside it for comments that look like proto field definitions -- they should
include the tag number.  Otherwise you're out of luck.

On Tue, Nov 10, 2009 at 4:00 PM, rahul prasad <rahu...@gmail.com> wrote:

> I am in a situation, where the .proto files are not present for the
> Protocol Buffers used in the application I am working on. Since the .proto
> files need to be created, I was wondering if the following yellow
> highlighted numbers should correspond to the same fields they stood for in
> the actual .proto files which were used to generate the classes?
>
> For example, -
>
> old proto file:
> package protos;
> message Person {
>   required string name = 1;
>   optional string age = 2;
> }
>
> new proto file:
> package protos;
> message Person {
>   required string name = 2;
>   optional string age = 1;
> }
>
> will this throw error when trying to retrieve data?, so what would your
> suggestion be in creating such a proto file when the original is not
> present.
>
> Regards,
> Rahul
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to