Re: [protobuf] Best Practices on updating generated Message object

2011-06-02 Thread Pherl Liu
You can probably use sub-builders in this case: e.g. myBuilder.getPriceBuilder().setValue(123); See http://code.google.com/apis/protocolbuffers/docs/reference/java-generated.html#messagein sub builders section. On Thu, May 26, 2011 at 2:58 PM, veaven vea...@gmail.com wrote: Hi, What's the

[protobuf] Best Practices on updating generated Message object

2011-05-26 Thread veaven
Hi, What's the best practices on updating generated Message objects? I use google-protobuf to generate Java classes according to proto file, since these classes are immutable so I need to use its Builder to copy/close the object and then update it. It is okay for a few update on the