So in our case, we can store the protobuf java object into mongoDB, and 
inside mongoDB, you can see the object is represented as BSON with 
fieldname has underscore, which cause the problem when we try to query from 
database by passing some field critiria. Since spring can not recognize the 
field with underscores.


On Wednesday, September 5, 2018 at 4:07:56 PM UTC-4, Chris Zhang wrote:
>
> Hi,
>
> I am new to Protobuf, and recently I found out that the java generated 
> code by protobuf has underscore by the end of each field names.
>
> For example,
>
> protobuf message file look like this:
>
> message DummyMessage [
>     
>     string some_id = 1;
>     bool is_active = 2;
> }
>
> The generated java code is like this:
>
> Class DummyMessage {
>
>     String someId_;
>     boolean isActive_;
>
> }
>
> Is there any way to get rid of the underscore of each field?
>
> Thanks,
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to